Package net.timewalker.ffmq4.utils.async
Class AsyncTaskProcessorThreadPool
- java.lang.Object
-
- net.timewalker.ffmq4.utils.pool.ObjectPool<AsyncTaskProcessorThread>
-
- net.timewalker.ffmq4.utils.async.AsyncTaskProcessorThreadPool
-
- All Implemented Interfaces:
ObjectPoolMBean
public final class AsyncTaskProcessorThreadPool extends ObjectPool<AsyncTaskProcessorThread>
AsyncTaskProcessorThreadPool
-
-
Field Summary
-
Fields inherited from class net.timewalker.ffmq4.utils.pool.ObjectPool
WHEN_EXHAUSTED_BLOCK, WHEN_EXHAUSTED_FAIL, WHEN_EXHAUSTED_RETURN_NULL, WHEN_EXHAUSTED_WAIT, WHEN_EXHAUSTED_WAIT_RETURN_NULL
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAsyncTaskProcessorThreadPool(String name, int minSize, int maxIdle, int maxSize, AsyncTaskProcessorThreadListener listener)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected AsyncTaskProcessorThreadcreatePoolObject()Create a new pool objectprotected voiddestroyPoolObject(AsyncTaskProcessorThread thread)Destroy a pool object-
Methods inherited from class net.timewalker.ffmq4.utils.pool.ObjectPool
borrow, close, exhaustionPolicyAsString, getThreadPoolAvailableCount, getThreadPoolExhaustionPolicy, getThreadPoolMaxIdle, getThreadPoolMaxSize, getThreadPoolMinSize, getThreadPoolPendingWaits, getThreadPoolSize, getThreadPoolWaitTimeout, init, release
-
-
-
-
Constructor Detail
-
AsyncTaskProcessorThreadPool
protected AsyncTaskProcessorThreadPool(String name, int minSize, int maxIdle, int maxSize, AsyncTaskProcessorThreadListener listener) throws javax.jms.JMSException
Constructor- Throws:
javax.jms.JMSException
-
-
Method Detail
-
createPoolObject
protected AsyncTaskProcessorThread createPoolObject() throws Exception
Description copied from class:ObjectPoolCreate a new pool object- Specified by:
createPoolObjectin classObjectPool<AsyncTaskProcessorThread>- Returns:
- an new pool object
- Throws:
Exception- on creation error
-
destroyPoolObject
protected void destroyPoolObject(AsyncTaskProcessorThread thread) throws Exception
Description copied from class:ObjectPoolDestroy a pool object- Specified by:
destroyPoolObjectin classObjectPool<AsyncTaskProcessorThread>- Parameters:
thread- the object to destroy- Throws:
Exception- on release error
-
-