public final class ExecutorUtils extends Object
ExecutorService
s.Modifier and Type | Method and Description |
---|---|
static ExecutorService |
newSingleDaemonThreadExecutor(int queueCapacity,
String threadNameFormat)
Create a bounded-queue executor with one thread for performing background tasks.
|
static void |
shutdown(ExecutorService executorService)
Null-safely shut down the provided executor service.
|
static void |
shutdownAndAwaitTermination(ExecutorService executorService,
Duration maxWaitDuration)
Null-safely shut down the provided executor service, waiting up to the provided max wait duration for it to complete.
|
public static ExecutorService newSingleDaemonThreadExecutor(int queueCapacity, String threadNameFormat)
public static void shutdown(ExecutorService executorService)
public static void shutdownAndAwaitTermination(ExecutorService executorService, Duration maxWaitDuration)
Copyright © 2017. All rights reserved.