/// <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); } }
/// <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); } } }
/// <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); } } }
/// <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); } }