|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.avalon.excalibur.pool.SingleThreadedPool
This is an Pool that caches Poolable objects for reuse.
| Field Summary | |
protected PoolController |
m_controller
|
protected int |
m_count
|
protected ObjectFactory |
m_factory
|
protected int |
m_initial
|
protected boolean |
m_initialized
|
protected int |
m_maximum
|
protected Poolable[] |
m_pool
|
| Constructor Summary | |
SingleThreadedPool(java.lang.Class clazz,
int initial,
int maximum)
|
|
SingleThreadedPool(ObjectFactory factory,
int initial,
int maximum)
|
|
SingleThreadedPool(ObjectFactory factory,
PoolController controller,
int initial,
int maximum)
|
|
| Method Summary | |
void |
dispose()
Dispose the pool and decommission any Poolables. |
void |
fill(int fillSize)
This fills the pool to the size specified in parameter. |
Poolable |
get()
Retrieve an object from pool. |
int |
getCapacity()
Return the total number of slots in Pool |
void |
grow(int increase)
This fills the pool by the size specified in parameter. |
void |
initialize()
Initialize the component. |
void |
put(Poolable poolable)
Place an object in pool. |
void |
shrink(int decrease)
This shrinks the pool by parameter size. |
int |
size()
Get the number of used slots in Pool |
| Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected boolean m_initialized
protected int m_count
protected Poolable[] m_pool
protected ObjectFactory m_factory
protected PoolController m_controller
protected int m_maximum
protected int m_initial
| Constructor Detail |
public SingleThreadedPool(java.lang.Class clazz,
int initial,
int maximum)
throws java.lang.Exception
public SingleThreadedPool(ObjectFactory factory,
int initial,
int maximum)
throws java.lang.Exception
public SingleThreadedPool(ObjectFactory factory,
PoolController controller,
int initial,
int maximum)
throws java.lang.Exception
| Method Detail |
public void initialize()
throws java.lang.Exception
Initializable
initialize in interface Initializablejava.lang.Exception - if an error occurs
public Poolable get()
throws java.lang.Exception
get in interface Pooljava.lang.Exceptionpublic void put(Poolable poolable)
put in interface Poolpoolable - the object to be placed in poolpublic final int getCapacity()
public final int size()
public final void fill(int fillSize)
throws java.lang.Exception
java.lang.Exceptionpublic final void grow(int increase)
grow in interface Resizablepublic final void shrink(int decrease)
shrink in interface Resizablepublic void dispose()
dispose in interface Disposable
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||