/** * Initiates an orderly shutdown in which previously submitted tasks are * executed, but no new tasks will be accepted. */ public void shutdown() { if (isShutdownAllowed()) { getWrapped().shutdown(); } }
/** * Attempts to stop all actively executing tasks, halts the processing of * waiting tasks, and returns a list of the tasks that were awaiting * execution. * * @return The list of tasks that never commenced execution; */ public List<Runnable> shutdownNow() { return isShutdownAllowed() ? getWrapped().shutdownNow() : Collections .<Runnable> emptyList(); }
/** * Attempts to stop all actively executing tasks, halts the processing of * waiting tasks, and returns a list of the tasks that were awaiting * execution. * * @return The list of tasks that never commenced execution; */ public List<Runnable> shutdownNow() { return isShutdownAllowed() && (getWrapped() != null) ? getWrapped() .shutdownNow() : Collections.<Runnable> emptyList(); }
/** * Initiates an orderly shutdown in which previously submitted tasks are * executed, but no new tasks will be accepted. */ public void shutdown() { if (isShutdownAllowed() && (getWrapped() != null)) { getWrapped().shutdown(); } }