public class ExecutorServiceUtils
extends java.lang.Object
| Constructor and Description |
|---|
ExecutorServiceUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
finishExecutorService(java.util.concurrent.ExecutorService executorService) |
static void |
finishExecutorService(java.util.concurrent.ExecutorService executorService,
long waitSecond) |
static java.util.concurrent.ScheduledExecutorService |
newScheduledDaemonThreadPool(int corePoolSize)
Creates a scheduled thread pool where each thread has the daemon
property set to true.
|
static java.util.concurrent.ExecutorService |
newSingleThreadDaemonExecutor()
Creates an Executor that is based on daemon threads.
|
public static java.util.concurrent.ExecutorService newSingleThreadDaemonExecutor()
public static java.util.concurrent.ScheduledExecutorService newScheduledDaemonThreadPool(int corePoolSize)
corePoolSize - the number of threads to keep in the pool,
even if they are idlepublic static void finishExecutorService(java.util.concurrent.ExecutorService executorService)
public static void finishExecutorService(java.util.concurrent.ExecutorService executorService,
long waitSecond)