public class GenericPoolableDeliveryThreadFactory
extends org.apache.commons.pool.BasePoolableObjectFactory
This object handles the DeliveryThread thread objects in the ObjectPool.
| Modifier and Type | Field and Description |
|---|---|
private Configuration |
configuration |
private DeliveryManager |
deliveryManager |
private ThreadGroup |
deliveryThreadGroup
This is the ThreadGroup of DeliveryThread objects.
|
private static org.slf4j.Logger |
log |
private org.apache.commons.pool.ObjectPool |
myParentPool |
private Integer |
rdCount
This is the counter of created DeliveryThread thread objects.
|
private Object |
rdLock |
| Constructor and Description |
|---|
GenericPoolableDeliveryThreadFactory(DeliveryManager deliveryManager,
Configuration configuration) |
| Modifier and Type | Method and Description |
|---|---|
void |
destroyObject(Object obj) |
void |
init(ThreadGroup deliveryThreadGroup,
org.apache.commons.pool.ObjectPool pool)
Initialization of this Factory.
|
Object |
makeObject() |
boolean |
validateObject(Object obj) |
private static final org.slf4j.Logger log
private ThreadGroup deliveryThreadGroup
private org.apache.commons.pool.ObjectPool myParentPool
private Integer rdCount
private Object rdLock
private final DeliveryManager deliveryManager
private final Configuration configuration
public GenericPoolableDeliveryThreadFactory(DeliveryManager deliveryManager, Configuration configuration)
public void init(ThreadGroup deliveryThreadGroup, org.apache.commons.pool.ObjectPool pool)
Initialization of this Factory. Prerequisite of right working.
deliveryThreadGroup - The threadgroup which contains the
DeliveryThread threads.pool - The pool which use this factory to create and handle objects.public Object makeObject() throws Exception
makeObject in interface org.apache.commons.pool.PoolableObjectFactorymakeObject in class org.apache.commons.pool.BasePoolableObjectFactoryExceptionpublic void destroyObject(Object obj) throws Exception
destroyObject in interface org.apache.commons.pool.PoolableObjectFactorydestroyObject in class org.apache.commons.pool.BasePoolableObjectFactoryExceptionpublic boolean validateObject(Object obj)
validateObject in interface org.apache.commons.pool.PoolableObjectFactoryvalidateObject in class org.apache.commons.pool.BasePoolableObjectFactoryCopyright © 2013. All Rights Reserved.