| java.lang.Object org.jacorb.notification.util.AbstractObjectPool
All known Subclasses: org.jacorb.notification.util.AbstractPoolablePool,
AbstractObjectPool | abstract public class AbstractObjectPool implements Runnable,Configurable(Code) | | Abstract Base Class for Simple Pooling Mechanism. Subclasses must at least implement the method
newInstance. To use a Object call lendObject. After use the Object must be returned with
returnObject(Object). An Object must not be used after it has been returned to its pool!
This class needs a two phase initialization: configure MUST be invoked before an instance can be used.
author: Alphonse Bendt version: $Id: AbstractObjectPool.java,v 1.22 2006/06/14 11:57:54 alphonse.bendt Exp $ |
DEBUG | final public static boolean DEBUG(Code) | | |
INITIAL_SIZE_DEFAULT | final public static int INITIAL_SIZE_DEFAULT(Code) | | |
LOWER_WATERMARK_DEFAULT | final public static int LOWER_WATERMARK_DEFAULT(Code) | | |
MAXIMUM_SIZE_DEFAULT | final public static int MAXIMUM_SIZE_DEFAULT(Code) | | |
MAXIMUM_WATERMARK_DEFAULT | final public static int MAXIMUM_WATERMARK_DEFAULT(Code) | | |
SIZE_INCREASE_DEFAULT | final public static int SIZE_INCREASE_DEFAULT(Code) | | |
SLEEP | final public static long SLEEP(Code) | | time the cleaner thread sleeps between two cleanups
|
config_ | protected Configuration config_(Code) | | |
logger_ | final protected Logger logger_(Code) | | |
AbstractObjectPool | protected AbstractObjectPool(String name)(Code) | | |
AbstractObjectPool | protected AbstractObjectPool(String name, int lowerWatermark, int sizeincrease, int initialsize, int maxWatermark, int maximumSize)(Code) | | |
configure | public void configure(Configuration conf)(Code) | | |
dispose | public void dispose()(Code) | | Release this Pool.
|
doActivateObject | public void doActivateObject(Object o)(Code) | | Is called before Object is returned to Client (lendObject). No Op
|
doDestroyObject | public void doDestroyObject(Object o)(Code) | | Is called if Pool is full and returned Object is discarded. No Op.
|
doPassivateObject | public void doPassivateObject(Object o)(Code) | | Is called after Object is returned to pool. No Op.
|
isCreationAllowed | protected boolean isCreationAllowed()(Code) | | check if it is allowed to create more instances.
preCondition: lock pool_ must be held.
|
lendObject | public Object lendObject()(Code) | | lend an object from the pool.
|
newInstance | abstract public Object newInstance()(Code) | | This method is called by the Pool to create a new Instance. Subclasses must override
appropiately .
|
poolIsEmpty | protected void poolIsEmpty()(Code) | | |
returnObject | public void returnObject(Object o)(Code) | | return an Object to the pool.
|
|
|