|Constructor and Description|
|Modifier and Type||Method and Description|
Shuts down the given
public static boolean shutdown(ExecutorService executorService, long timeout, TimeUnit timeUnit, String source)
ExecutorServicein an orderly fashion. Disables new tasks from submission and then waits for existing tasks to terminate. Eventually cancels running tasks if too much time elapses.
If the timeout is 0, then a plain shutdown takes place.
executorService- the pool to shutdown.
timeout- the maximum time to wait, or 0 to not wait for existing tasks to terminate.
timeUnit- the time unit of the timeout argument
source- use this string in any log messages.
trueif the given executor terminated and
falseif the timeout elapsed before termination.
Copyright © 1999-2017 The Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.