org.jwarp.service.objectpool
Class PersistentObjectPool
java.lang.Object
|
+--org.jwarp.service.objectpool.ObjectPool
|
+--org.jwarp.service.objectpool.PersistentObjectPool
- All Implemented Interfaces:
- IObjectPool, IPersistentObjectPool
- public class PersistentObjectPool
- extends ObjectPool
- implements IPersistentObjectPool
| Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.jwarp.service.objectpool.IObjectPool |
get |
poolThread
protected ObjectPoolThread poolThread
databases
protected java.util.Hashtable databases
PersistentObjectPool
public PersistentObjectPool(java.lang.String objectType)
PersistentObjectPool
public PersistentObjectPool(java.lang.String objectType,
org.exolab.castor.jdo.JDO jdo)
PersistentObjectPool
public PersistentObjectPool(java.lang.String objectType,
ICache cache)
PersistentObjectPool
public PersistentObjectPool(java.lang.String objectType,
org.exolab.castor.jdo.JDO jdo,
ICache cache)
initPersistence
public void initPersistence(java.lang.String name,
java.lang.String configFile)
throws PersistenceException
- Specified by:
initPersistence in interface IPersistentObjectPool
setObjectType
public void setObjectType(java.lang.String objectType)
- Overrides:
setObjectType in class ObjectPool
getObjectType
public java.lang.String getObjectType()
- Returns the class of the pooled objects
- Specified by:
getObjectType in interface IPersistentObjectPool- Overrides:
getObjectType in class ObjectPool
- Returns:
- The objects' class
flush
public void flush()
get
public java.lang.Object get(IPersistentObject key)
throws PersistenceException
get
public java.lang.Object get(int key)
throws PersistenceException
- Specified by:
get in interface IPersistentObjectPool
put
public void put(IPersistentObject object)
throws PersistenceException
- Specified by:
put in interface IPersistentObjectPool- Overrides:
put in class ObjectPool
put
public void put(java.lang.Object key,
java.lang.Object newObject)
throws PersistenceException
- Specified by:
put in interface IObjectPool- Overrides:
put in class ObjectPool
remove
public java.lang.Object remove(IPersistentObject object)
throws PersistenceException
remove
public java.lang.Object remove(int key)
throws PersistenceException
- Specified by:
remove in interface IPersistentObjectPool
updateObject
public void updateObject(java.lang.Object key)
throws PersistenceException
store
public void store()
throws PersistenceException
- Specified by:
store in interface IPersistentObjectPool
setUpdateTime
public void setUpdateTime(int seconds)
- Set the time for periodic updates of the current beans status.