org.huihoo.jfox.pool
Interface IndexedObjectPool

All Known Implementing Classes:
IndexedObjectPoolSupport, StatefulSessionBeanObjectPool

public interface IndexedObjectPool


Method Summary
 void clear()
          Clears any objects sitting idle in the pool, releasing any associated resources
 ObjectFactory getObjectFactory()
          get the factory use to create new instances
 int getRest()
          get the count of rest object
 int getWorking()
          get the count of working object
 boolean removeObject(java.lang.Object key)
          remove a poolable object from the pool
 boolean restoreObject(java.lang.Object key, PoolableObject obj)
          restore the retrived object to object pool
 PoolableObject retrieveObject(java.lang.Object key)
          retrieve Object from object pool with the key 如果这个 key 还不存在,就新建该 key ,并返回和该 key 关联的对象
 

Method Detail

retrieveObject

public PoolableObject retrieveObject(java.lang.Object key)
                              throws java.lang.Exception
retrieve Object from object pool with the key 如果这个 key 还不存在,就新建该 key ,并返回和该 key 关联的对象

Returns:
Throws:
java.lang.Exception

restoreObject

public boolean restoreObject(java.lang.Object key,
                             PoolableObject obj)
restore the retrived object to object pool

Returns:
true if success, false if failed

removeObject

public boolean removeObject(java.lang.Object key)
remove a poolable object from the pool

Parameters:
key -
Returns:

clear

public void clear()
Clears any objects sitting idle in the pool, releasing any associated resources


getObjectFactory

public ObjectFactory getObjectFactory()
get the factory use to create new instances


getWorking

public int getWorking()
get the count of working object

Returns:

getRest

public int getRest()
get the count of rest object

Returns: