Class InboundThreadPool
- java.lang.Object
-
- java.util.concurrent.AbstractExecutorService
-
- java.util.concurrent.ThreadPoolExecutor
-
- org.apache.synapse.util.concurrent.InboundThreadPool
-
- All Implemented Interfaces:
Executor
,ExecutorService
public class InboundThreadPool extends ThreadPoolExecutor
This is the executor service that will be returned by the env
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.concurrent.ThreadPoolExecutor
ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy
-
-
Field Summary
Fields Modifier and Type Field Description static String
IB_THREAD_CORE
static String
IB_THREAD_MAX
static int
INBOUND_CORE_THREADS
static int
INBOUND_KEEP_ALIVE
static int
INBOUND_MAX_THREADS
static String
INBOUND_THREAD_GROUP
static String
INBOUND_THREAD_ID_PREFIX
static int
INBOUND_THREAD_QLEN
-
Constructor Summary
Constructors Constructor Description InboundThreadPool()
Default Constructor for the thread pool and will use all the values as defaultInboundThreadPool(int corePoolSize, int maxPoolSize, long keepAliveTime, int qlen, String threadGroup, String threadIdPrefix)
Constructor for the InboundThreadPoolInboundThreadPool(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue)
Constructor for the Inbound thread poll
-
Method Summary
-
Methods inherited from class java.util.concurrent.ThreadPoolExecutor
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
-
Methods inherited from class java.util.concurrent.AbstractExecutorService
invokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor, submit, submit, submit
-
-
-
-
Field Detail
-
INBOUND_CORE_THREADS
public static final int INBOUND_CORE_THREADS
- See Also:
- Constant Field Values
-
INBOUND_MAX_THREADS
public static final int INBOUND_MAX_THREADS
- See Also:
- Constant Field Values
-
INBOUND_KEEP_ALIVE
public static final int INBOUND_KEEP_ALIVE
- See Also:
- Constant Field Values
-
INBOUND_THREAD_QLEN
public static final int INBOUND_THREAD_QLEN
- See Also:
- Constant Field Values
-
INBOUND_THREAD_GROUP
public static final String INBOUND_THREAD_GROUP
- See Also:
- Constant Field Values
-
INBOUND_THREAD_ID_PREFIX
public static final String INBOUND_THREAD_ID_PREFIX
- See Also:
- Constant Field Values
-
IB_THREAD_CORE
public static final String IB_THREAD_CORE
- See Also:
- Constant Field Values
-
IB_THREAD_MAX
public static final String IB_THREAD_MAX
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
InboundThreadPool
public InboundThreadPool(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue)
Constructor for the Inbound thread poll- Parameters:
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.
-
InboundThreadPool
public InboundThreadPool()
Default Constructor for the thread pool and will use all the values as default
-
InboundThreadPool
public InboundThreadPool(int corePoolSize, int maxPoolSize, long keepAliveTime, int qlen, String threadGroup, String threadIdPrefix)
Constructor for the InboundThreadPool- Parameters:
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 prefix
-
-