public class SynapseThreadPool extends ThreadPoolExecutor
ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy
Modifier and Type | Field and Description |
---|---|
static String |
SYN_THREAD_ALIVE |
static String |
SYN_THREAD_CORE |
static String |
SYN_THREAD_GROUP |
static String |
SYN_THREAD_IDPREFIX |
static String |
SYN_THREAD_MAX |
static String |
SYN_THREAD_QLEN |
static int |
SYNAPSE_CORE_THREADS |
static int |
SYNAPSE_KEEP_ALIVE |
static int |
SYNAPSE_MAX_THREADS |
static String |
SYNAPSE_THREAD_GROUP |
static String |
SYNAPSE_THREAD_ID_PREFIX |
static int |
SYNAPSE_THREAD_QLEN |
Constructor and Description |
---|
SynapseThreadPool()
Default Constructor for the thread pool and will use all the values as default
|
SynapseThreadPool(int corePoolSize,
int maxPoolSize,
long keepAliveTime,
int qlen,
String threadGroup,
String threadIdPrefix)
Constructor for the SynapseThreadPool
|
SynapseThreadPool(int corePoolSize,
int maximumPoolSize,
long keepAliveTime,
TimeUnit unit,
BlockingQueue<Runnable> workQueue)
Constructor for the Synapse thread poll
|
afterExecute, allowCoreThreadTimeOut, allowsCoreThreadTimeOut, awaitTermination, beforeExecute, execute, finalize, getActiveCount, getCompletedTaskCount, getCorePoolSize, getKeepAliveTime, getLargestPoolSize, getMaximumPoolSize, getPoolSize, getQueue, getRejectedExecutionHandler, getTaskCount, getThreadFactory, isShutdown, isTerminated, isTerminating, prestartAllCoreThreads, prestartCoreThread, purge, remove, setCorePoolSize, setKeepAliveTime, setMaximumPoolSize, setRejectedExecutionHandler, setThreadFactory, shutdown, shutdownNow, terminated, toString
invokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor, submit, submit, submit
public static final int SYNAPSE_CORE_THREADS
public static final int SYNAPSE_MAX_THREADS
public static final int SYNAPSE_KEEP_ALIVE
public static final int SYNAPSE_THREAD_QLEN
public static final String SYNAPSE_THREAD_GROUP
public static final String SYNAPSE_THREAD_ID_PREFIX
public static final String SYN_THREAD_CORE
public static final String SYN_THREAD_MAX
public static final String SYN_THREAD_ALIVE
public static final String SYN_THREAD_QLEN
public static final String SYN_THREAD_GROUP
public static final String SYN_THREAD_IDPREFIX
public SynapseThreadPool(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue)
corePoolSize
- - number of threads to keep in the pool, even if they are idlemaximumPoolSize
- - the maximum number of threads to allow in the poolkeepAliveTime
- - this is the maximum time that excess idle threads will wait
for new tasks before terminating.unit
- - the time unit for the keepAliveTime argument.workQueue
- - the queue to use for holding tasks before they are executed.public SynapseThreadPool()
public SynapseThreadPool(int corePoolSize, int maxPoolSize, long keepAliveTime, int qlen, String threadGroup, String threadIdPrefix)
corePoolSize
- - number of threads to keep in the pool, even if they are idlemaxPoolSize
- - the maximum number of threads to allow in the poolkeepAliveTime
- - this is the maximum time that excess idle threads will wait
for new tasks before terminating.qlen
- - Thread Blocking Queue lengththreadGroup
- - ThreadGroup namethreadIdPrefix
- - Thread id prefixCopyright © 2005-2017 Apache Software Foundation. All Rights Reserved.