org.apache.avalon.excalibur.pool
Class AbstractPool
java.lang.Object
|
+--org.apache.avalon.framework.logger.AbstractLoggable
|
+--org.apache.avalon.excalibur.pool.AbstractPool
- All Implemented Interfaces:
- Component, Loggable, Pool, ThreadSafe
- Direct Known Subclasses:
- DefaultPool
- public abstract class AbstractPool
- extends AbstractLoggable
- implements Pool, ThreadSafe
This is an Pool
that caches Poolable objects for reuse.
- Version:
- CVS $Revision: 1.5 $ $Date: 2001/06/01 21:09:28 $
- Author:
- Berin Loritsch
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_POOL_SIZE
public static final int DEFAULT_POOL_SIZE
m_factory
protected final ObjectFactory m_factory
m_active
protected java.util.List m_active
m_ready
protected java.util.List m_ready
m_mutex
protected Lock m_mutex
m_initialized
protected boolean m_initialized
AbstractPool
public AbstractPool(ObjectFactory factory)
throws java.lang.Exception
- Create an AbstractPool. The pool requires a factory, and can
optionally have a controller.
initialize
protected void initialize()
throws java.lang.Exception
newPoolable
protected Poolable newPoolable()
throws java.lang.Exception
- This is the method to override when you need to enforce creational
policies.
removePoolable
protected void removePoolable(Poolable poolable)
- This is the method to override when you need to enforce destructional
policies.
size
protected final int size()
get
public abstract Poolable get()
throws java.lang.Exception
- Specified by:
get
in interface Pool
put
public abstract void put(Poolable object)
- Specified by:
put
in interface Pool
Copyright © 2001 Apache Jakarta Project. All Rights Reserved.