org.jwarp.service.objectpool
Class ObjectPool

java.lang.Object
  |
  +--org.jwarp.service.objectpool.ObjectPool
All Implemented Interfaces:
IObjectPool
Direct Known Subclasses:
PersistentObjectPool

public class ObjectPool
extends java.lang.Object
implements IObjectPool


Field Summary
protected  ICache objects
           
protected  java.lang.String objectType
           
 
Constructor Summary
ObjectPool(java.lang.String objectType)
           
ObjectPool(java.lang.String objectType, ICache cache)
           
 
Method Summary
 java.lang.Object get(java.lang.Object key)
           
 ICache getCache()
           
 java.lang.String getObjectType()
          Returns the class of the pooled objects
 void put(IPersistentObject object)
           
 void put(java.lang.Object key, java.lang.Object newObject)
           
 java.lang.Object remove(java.lang.Object key)
           
 void setObjectType(java.lang.String objectType)
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

objectType

protected java.lang.String objectType

objects

protected ICache objects
Constructor Detail

ObjectPool

public ObjectPool(java.lang.String objectType)

ObjectPool

public ObjectPool(java.lang.String objectType,
                  ICache cache)
Method Detail

setObjectType

public void setObjectType(java.lang.String objectType)

getObjectType

public java.lang.String getObjectType()
Returns the class of the pooled objects
Specified by:
getObjectType in interface IObjectPool
Returns:
The objects' class

get

public java.lang.Object get(java.lang.Object key)
                     throws PersistenceException
Specified by:
get in interface IObjectPool

put

public void put(IPersistentObject object)
         throws PersistenceException

remove

public java.lang.Object remove(java.lang.Object key)
                        throws PersistenceException
Specified by:
remove in interface IObjectPool

put

public void put(java.lang.Object key,
                java.lang.Object newObject)
         throws PersistenceException
Specified by:
put in interface IObjectPool

getCache

public ICache getCache()

©   O R C A   S y s t e m s