public final class SharedExecutors 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 ExecutorService | 
getPoolThreadExecutor()
Returns the shared thread pool executor. 
 | 
static ExecutorService | 
getSingleThreadExecutor()
Returns the shared single thread executor. 
 | 
static Timer | 
getTimer()
Returns the shared timer. 
 | 
static void | 
setMetricsService(MetricsService metricsService)
Enables or disables calculation of the pool performance metrics. 
 | 
static void | 
setPoolSize(int poolSize)
Sets the shared thread pool size. 
 | 
static void | 
shutdown()
Shuts down all shared timers and executors and therefore should be
 called only by the framework. 
 | 
public static final int DEFAULT_POOL_SIZE
public static ExecutorService getSingleThreadExecutor()
public static ExecutorService getPoolThreadExecutor()
public static Timer getTimer()
public static void setPoolSize(int poolSize)
poolSize - new pool sizepublic static void setMetricsService(MetricsService metricsService)
metricsService - optional metric servicepublic static void shutdown()