예제 #1
0
        /// <summary>
        /// Remove all executors from storage.
        ///
        /// </summary>
        /// <remarks>
        /// Q: What to do with applications that have running threads on any of the executors?
        /// A: This is a storage level function so we cannot stop the applications on the executors from here.
        /// </remarks>
        /// <param name="storage">Target storage where this maintanance will be performed.</param>
        public void RemoveAllExecutors(IManagerStorage storage)
        {
            ExecutorStorageView[] executors = storage.GetExecutors();

            foreach (ExecutorStorageView executor in executors)
            {
                storage.DeleteExecutor(executor);
            }
        }
예제 #2
0
        /// <summary>
        /// Remove all executors that have not been pinged since the given time.
        /// </summary>
        /// <param name="storage">Target storage where this maintanance will be performed.</param>
        /// <param name="pingTimeCutOff"></param>
        public void RemoveExecutors(IManagerStorage storage, DateTime pingTimeCutOff)
        {
            ExecutorStorageView[] executors = storage.GetExecutors();

            foreach (ExecutorStorageView executor in executors)
            {
                if (executor.PingTime < pingTimeCutOff)
                {
                    storage.DeleteExecutor(executor);
                }
            }
        }
예제 #3
0
        /// <summary>
        /// Remove all executors that have not been pinged since the given time.
        /// </summary>
        /// <param name="storage">Target storage where this maintanance will be performed.</param>
        /// <param name="pingTimeCutOff"></param>
        public void RemoveExecutors(IManagerStorage storage, DateTime pingTimeCutOff)
        {
            ExecutorStorageView[] executors = storage.GetExecutors();

            foreach (ExecutorStorageView executor in executors)
            {
                if (executor.PingTime < pingTimeCutOff)
                {
                    storage.DeleteExecutor(executor);
                }
            }
        }
예제 #4
0
        /// <summary>
        /// Remove all executors from storage.
        /// 
        /// </summary>
        /// <remarks>
        /// Q: What to do with applications that have running threads on any of the executors?
        /// A: This is a storage level function so we cannot stop the applications on the executors from here. 
        /// </remarks>
        /// <param name="storage">Target storage where this maintanance will be performed.</param>
        public void RemoveAllExecutors(IManagerStorage storage)
        {
            ExecutorStorageView[] executors = storage.GetExecutors();

            foreach (ExecutorStorageView executor in executors)
            {
                storage.DeleteExecutor(executor);
            }
        }