public final class MoreExecutors extends Object
| Constructor and Description |
|---|
MoreExecutors() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addDelayedShutdownHook(ExecutorService service,
long terminationTimeout,
TimeUnit timeUnit)
Adds the delayed shutdown hook.
|
static ExecutorService |
getExitingExecutorService(ThreadPoolExecutor executor)
Gets the exiting executor service.
|
static ExecutorService |
getExitingExecutorService(ThreadPoolExecutor executor,
long terminationTimeout,
TimeUnit timeUnit)
Gets the exiting executor service.
|
static ScheduledExecutorService |
getExitingScheduledExecutorService(ScheduledThreadPoolExecutor executor)
Gets the exiting scheduled executor service.
|
static ScheduledExecutorService |
getExitingScheduledExecutorService(ScheduledThreadPoolExecutor executor,
long terminationTimeout,
TimeUnit timeUnit)
Gets the exiting scheduled executor service.
|
public static ExecutorService getExitingExecutorService(ThreadPoolExecutor executor)
executor - public static ExecutorService getExitingExecutorService(ThreadPoolExecutor executor, long terminationTimeout, TimeUnit timeUnit)
executor - terminationTimeout - timeUnit - public static ScheduledExecutorService getExitingScheduledExecutorService(ScheduledThreadPoolExecutor executor)
executor - public static ScheduledExecutorService getExitingScheduledExecutorService(ScheduledThreadPoolExecutor executor, long terminationTimeout, TimeUnit timeUnit)
executor - terminationTimeout - timeUnit - public static void addDelayedShutdownHook(ExecutorService service, long terminationTimeout, TimeUnit timeUnit)
service - terminationTimeout - timeUnit - Copyright © 2021. All rights reserved.