public class ExecutorUtils extends Object
Constructor and Description |
---|
ExecutorUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
gracefulShutdown(long timeout,
TimeUnit unit,
ExecutorService... executorServices)
Gracefully shutdown the given
ExecutorService . |
public static void gracefulShutdown(long timeout, TimeUnit unit, ExecutorService... executorServices)
ExecutorService
. The call waits the given timeout that
all ExecutorServices terminate. If the ExecutorServices do not terminate in this time,
they will be shut down hard.timeout
- to wait for the termination of all ExecutorServicesunit
- of the timeoutexecutorServices
- to shut downCopyright © 2014–2017 The Apache Software Foundation. All rights reserved.