nl.knowledgeplaza.util.pool
Class StackObjectPool

java.lang.Object
  extended by nl.knowledgeplaza.util.pool.BaseObjectPool
      extended by nl.knowledgeplaza.util.pool.StackObjectPool
All Implemented Interfaces:
ObjectPool

public class StackObjectPool
extends BaseObjectPool
implements ObjectPool

This class implements a stack (LIFO) pool.

Version:
$Revision: 1.2 $
Author:
$Author: toeukpap $
See Also:

Nested Class Summary
 
Nested classes/interfaces inherited from class nl.knowledgeplaza.util.pool.BaseObjectPool
BaseObjectPool.NotFromThisPoolException, BaseObjectPool.TimeOutException
 
Field Summary
protected  java.util.Stack 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
StackObjectPool()
          Initialize
StackObjectPool(java.util.Collection collection)
          Initialize
StackObjectPool(PoolableObjectFactory poolableObjectFactory)
          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 nl.knowledgeplaza.util.pool.BaseObjectPool
addObject, borrowObject, clear, close, factoryActivateObject, factoryDestroyObject, factoryMakeObject, factoryPassivateObject, factoryValidateObject, fill, getFactory, getMaxActive, getMaxIdle, getMaxWait, getName, getNameDescription, getNumActive, getNumberOfObjectsScheduledForDestruction, getNumIdle, getPooledObjects, getTestOnBorrow, getWhenExhaustedAction, invalidateObject, isClosed, isShuttingDown, isSynchronized, maintenance, obtainPooledObject, returnObject, returnPooledObject, setFactory, setMaxActive, setMaxIdle, setMaxWait, setName, setSynchronized, setTestOnBorrow, setWhenExhaustedAction, shutdown
 
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

SOURCECODE_VERSION

public static final java.lang.String SOURCECODE_VERSION
Standard variable for determining version of a class file.

See Also:
Constant Field Values

iListOfPooledObjects

protected java.util.Stack iListOfPooledObjects
the storage

Constructor Detail

StackObjectPool

public StackObjectPool()
Initialize


StackObjectPool

public StackObjectPool(PoolableObjectFactory poolableObjectFactory)
Initialize


StackObjectPool

public StackObjectPool(java.util.Collection collection)
Initialize

Method Detail

getPooledObjectsImpl

protected java.util.Collection getPooledObjectsImpl()
Description copied from class: BaseObjectPool
this method allows read only access to the collection of handed out objects, used by the generic algorithm

Specified by:
getPooledObjectsImpl in class BaseObjectPool

obtainPooledObjectImpl

protected java.lang.Object obtainPooledObjectImpl()
Description copied from class: BaseObjectPool
this method obtains a pooled object, the implementation determines the behaviour (LIFO, FIFO, etc)

Specified by:
obtainPooledObjectImpl in class BaseObjectPool

returnPooledObjectImpl

protected void returnPooledObjectImpl(java.lang.Object o)
Description copied from class: BaseObjectPool
this method returns a pooled object, the implementation determines the behaviour (LIFO, FIFO, etc)

Specified by:
returnPooledObjectImpl in class BaseObjectPool


Copyright © 2010 KnowledgePlaza. All Rights Reserved.