/** * Clear out all delegate executors at once. Tasks will be rejected until another delegate executor is added. */ public void clear() { executorsUpdater.clear(this); }
/** * Construct a new instance. * * @param executors the initial list of executors to delegate to */ public BalancingExecutor(Executor... executors) { if (executors != null && executors.length > 0) { final Executor[] clone = executors.clone(); for (int i = 0; i < clone.length; i++) { Assert.checkNotNullArrayParam("executors", i, clone[i]); } executorsUpdater.set(this, clone); } else { executorsUpdater.clear(this); } }
/** * Clear out all delegate executors at once. Tasks will be rejected until another delegate executor is added. */ public void clear() { executorsUpdater.clear(this); }
/** * Clear out all delegate executors at once. Tasks will be rejected until another delegate executor is added. */ public void clear() { executorsUpdater.clear(this); }
/** * Construct a new instance. * * @param executors the initial list of executors to delegate to */ public BalancingExecutor(Executor... executors) { if (executors != null && executors.length > 0) { final Executor[] clone = executors.clone(); for (int i = 0; i < clone.length; i++) { Assert.checkNotNullArrayParam("executors", i, clone[i]); } executorsUpdater.set(this, clone); } else { executorsUpdater.clear(this); } }
/** * Construct a new instance. * * @param executors the initial list of executors to delegate to */ public BalancingExecutor(Executor... executors) { if (executors != null && executors.length > 0) { final Executor[] clone = executors.clone(); for (int i = 0; i < clone.length; i++) { Assert.checkNotNullArrayParam("executors", i, clone[i]); } executorsUpdater.set(this, clone); } else { executorsUpdater.clear(this); } }