public final class SharedScheduledExecutors extends Object
Whenever possible, use of these shared resources is encouraged over creating separate ones.
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_POOL_SIZE |
| Modifier and Type | Method and Description |
|---|---|
static SharedScheduledExecutorService |
getPoolThreadExecutor()
Returns the shared scheduled thread pool executor.
|
static SharedScheduledExecutorService |
getSingleThreadExecutor()
Returns the shared scheduled single thread executor.
|
static void |
setPoolSize(int poolSize)
Configures the shared scheduled thread pool size.
|
static void |
shutdown()
Shuts down all shared scheduled executors.
|
public static final int DEFAULT_POOL_SIZE
public static SharedScheduledExecutorService getSingleThreadExecutor()
public static SharedScheduledExecutorService getPoolThreadExecutor()
public static void setPoolSize(int poolSize)
poolSize - new pool sizepublic static void shutdown()
Copyright © 2016. All rights reserved.