|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnl.knowledgeplaza.util.pool.BaseObjectPool
nl.knowledgeplaza.util.pool.PriorityObjectPool
public class PriorityObjectPool
This class implements a priority pool. This means that the pooled objects are sorted according to criteria implemented by a Comparator.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class nl.knowledgeplaza.util.pool.BaseObjectPool |
|---|
BaseObjectPool.NotFromThisPoolException, BaseObjectPool.TimeOutException |
| Field Summary | |
|---|---|
protected SortedList |
iListOfPooledObjects
the storage |
static java.lang.String |
SOURCECODE_VERSION
Standard variable for determining version of a class file. |
| Fields inherited from class nl.knowledgeplaza.util.pool.BaseObjectPool |
|---|
iClose, iListOfHandedOutObjects, iListOfHandedOutObjectsSync, iShuttingDown, iSynchronized, itestOnBorrow, MAINTENANCE_PERIOD, WHEN_EXHAUSTED_BLOCK, WHEN_EXHAUSTED_FAIL |
| Constructor Summary | |
|---|---|
PriorityObjectPool()
Initialize Assume that the pooled objects are Comparable |
|
PriorityObjectPool(java.util.Collection collection)
Initialize Assume that the pooled objects are Comparable |
|
PriorityObjectPool(java.util.Collection collection,
java.util.Comparator comparator)
Initialize |
|
PriorityObjectPool(java.util.Comparator comparator)
Initialize |
|
PriorityObjectPool(PoolableObjectFactory poolableObjectFactory)
Initialize Assume that the pooled objects are Comparable |
|
PriorityObjectPool(PoolableObjectFactory poolableObjectFactory,
java.util.Comparator comparator)
Initialize |
|
| Method Summary | |
|---|---|
protected java.util.Collection |
getPooledObjectsImpl()
this method allows read only access to the collection of handed out objects, used by the generic algorithm |
protected java.lang.Object |
obtainPooledObjectImpl()
this method obtains a pooled object, the implementation determines the behaviour (LIFO, FIFO, etc) |
protected void |
returnPooledObjectImpl(java.lang.Object o)
this method returns a pooled object, the implementation determines the behaviour (LIFO, FIFO, etc) |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface nl.knowledgeplaza.util.pool.ObjectPool |
|---|
addObject, borrowObject, clear, close, getNumActive, getNumIdle, invalidateObject, isSynchronized, returnObject, setFactory, setSynchronized, shutdown |
| Field Detail |
|---|
public static final java.lang.String SOURCECODE_VERSION
protected SortedList iListOfPooledObjects
| Constructor Detail |
|---|
public PriorityObjectPool()
public PriorityObjectPool(java.util.Comparator comparator)
public PriorityObjectPool(PoolableObjectFactory poolableObjectFactory)
public PriorityObjectPool(PoolableObjectFactory poolableObjectFactory,
java.util.Comparator comparator)
public PriorityObjectPool(java.util.Collection collection)
public PriorityObjectPool(java.util.Collection collection,
java.util.Comparator comparator)
| Method Detail |
|---|
protected java.util.Collection getPooledObjectsImpl()
BaseObjectPool
getPooledObjectsImpl in class BaseObjectPoolprotected java.lang.Object obtainPooledObjectImpl()
BaseObjectPool
obtainPooledObjectImpl in class BaseObjectPoolprotected void returnPooledObjectImpl(java.lang.Object o)
BaseObjectPool
returnPooledObjectImpl in class BaseObjectPool
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||