Interface DynamicExecutor
public interface DynamicExecutor
The executor interface to provide concurrent functionality.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Backup pool size for the executor.static final BlockingQueue<Runnable>
Instantiates the queue of Runnables as aLinkedBlockingDeque
.static final int
Core pool size for the executor.static final long
The amount of time an idle thread waits before terminating.static final TimeUnit
The keep alive time unit.static final int
Maximum pool size for the executor.static final int
Gets the number of available cores.static final ThreadFactory
Thread factory for the backup pool executor.static final BlockingQueue<Runnable>
Instantiates the queue of Runnables as aSynchronousQueue
. -
Method Summary
Modifier and TypeMethodDescriptionReturns the default executor service.
-
Field Details
-
NUMBER_OF_CORES
static final int NUMBER_OF_CORESGets the number of available cores. (not always the same as the maximum number of cores) -
CORE_POOL_SIZE
static final int CORE_POOL_SIZECore pool size for the executor.- See Also:
-
MAXIMUM_POOL_SIZE
static final int MAXIMUM_POOL_SIZEMaximum pool size for the executor.- See Also:
-
BACKUP_POOL_SIZE
static final int BACKUP_POOL_SIZEBackup pool size for the executor.- See Also:
-
WORK_QUEUE
Instantiates the queue of Runnables as aSynchronousQueue
. -
BACKUP_WORK_QUEUE
Instantiates the queue of Runnables as aLinkedBlockingDeque
. -
KEEP_ALIVE
static final long KEEP_ALIVEThe amount of time an idle thread waits before terminating.- See Also:
-
KEEP_ALIVE_UNIT
The keep alive time unit. -
THREAD_FACTORY
Thread factory for the backup pool executor.
-
-
Method Details
-
getDefaultExecutor
Returns the default executor service.- Returns:
- The default executor service.
-