org.huihoo.jfox.pool
Class IndexedObjectPoolSupport

java.lang.Object
  extended byorg.huihoo.jfox.system.ComponentSupport
      extended byorg.huihoo.jfox.pool.IndexedObjectPoolSupport
All Implemented Interfaces:
Component, IndexedObjectPool, Loggable, Persistentable, java.io.Serializable
Direct Known Subclasses:
SimpleIndexedObjectPool

public abstract class IndexedObjectPoolSupport
extends ComponentSupport
implements IndexedObjectPool

See Also:
Serialized Form

Field Summary
protected  ObjectFactory factory
           
protected  ObjectPoolSupport pool
          这个池用来实际的生成和缓存池对象
 
Fields inherited from class org.huihoo.jfox.system.ComponentSupport
logger, name, proxyInstance, sequence, state
 
Constructor Summary
IndexedObjectPoolSupport(ObjectFactory factory)
           
IndexedObjectPoolSupport(java.lang.String objectFactoryClassName, java.lang.String poolableClassName)
           
 
Method Summary
 void clear()
          Clears any objects sitting idle in the pool, releasing any associated resources
protected  void doDestroy()
          do actually destory action
protected  void doInit()
          do actually create action
 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
 
Methods inherited from class org.huihoo.jfox.system.ComponentSupport
destroy, getLogger, getName, getState, init, parseName, setLogger, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.huihoo.jfox.pool.IndexedObjectPool
removeObject, restoreObject, retrieveObject
 

Field Detail

pool

protected ObjectPoolSupport pool
这个池用来实际的生成和缓存池对象


factory

protected ObjectFactory factory
Constructor Detail

IndexedObjectPoolSupport

public IndexedObjectPoolSupport(ObjectFactory factory)

IndexedObjectPoolSupport

public IndexedObjectPoolSupport(java.lang.String objectFactoryClassName,
                                java.lang.String poolableClassName)
Method Detail

clear

public void clear()
Description copied from interface: IndexedObjectPool
Clears any objects sitting idle in the pool, releasing any associated resources

Specified by:
clear in interface IndexedObjectPool

getObjectFactory

public ObjectFactory getObjectFactory()
Description copied from interface: IndexedObjectPool
get the factory use to create new instances

Specified by:
getObjectFactory in interface IndexedObjectPool

getRest

public int getRest()
Description copied from interface: IndexedObjectPool
get the count of rest object

Specified by:
getRest in interface IndexedObjectPool
Returns:

getWorking

public int getWorking()
Description copied from interface: IndexedObjectPool
get the count of working object

Specified by:
getWorking in interface IndexedObjectPool
Returns:

doInit

protected void doInit()
               throws java.lang.Exception
Description copied from class: ComponentSupport
do actually create action

Specified by:
doInit in class ComponentSupport
Throws:
java.lang.Exception

doDestroy

protected void doDestroy()
                  throws java.lang.Exception
Description copied from class: ComponentSupport
do actually destory action

Specified by:
doDestroy in class ComponentSupport
Throws:
java.lang.Exception