org.apache.avalon.excalibur.pool
Class AbstractPool

java.lang.Object
  |
  +--org.apache.avalon.framework.logger.AbstractLogEnabled
        |
        +--org.apache.avalon.excalibur.pool.AbstractPool
All Implemented Interfaces:
org.apache.avalon.framework.component.Component, org.apache.avalon.framework.logger.LogEnabled, org.apache.avalon.framework.logger.Loggable, Pool, org.apache.avalon.framework.thread.ThreadSafe
Direct Known Subclasses:
DefaultPool

public abstract synchronized class AbstractPool
extends org.apache.avalon.framework.logger.AbstractLogEnabled
implements Pool, org.apache.avalon.framework.logger.Loggable, org.apache.avalon.framework.thread.ThreadSafe


Field Summary
static int DEFAULT_POOL_SIZE
           
protected  java.util.List m_active
           
protected  ObjectFactory m_factory
           
protected  boolean m_initialized
           
protected  int m_min
           
protected  org.apache.avalon.excalibur.concurrent.Mutex m_mutex
           
protected  org.apache.avalon.excalibur.collections.Buffer m_ready
           
 
Constructor Summary
AbstractPool(ObjectFactory)
           
 
Method Summary
abstract  Poolable get()
           
protected  void initialize()
           
protected  void internalGrow(int)
           
protected  void internalShrink(int)
           
protected  Poolable newPoolable()
           
abstract  void put(Poolable)
           
protected  void removePoolable(Poolable)
           
 void setLogger(org.apache.log.Logger)
           
 int size()
           
 
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

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 org.apache.avalon.excalibur.collections.Buffer m_ready

m_mutex

protected org.apache.avalon.excalibur.concurrent.Mutex m_mutex

m_initialized

protected boolean m_initialized

m_min

protected int m_min
Constructor Detail

AbstractPool

public AbstractPool(ObjectFactory)
             throws java.lang.Exception
Method Detail

setLogger

public void setLogger(org.apache.log.Logger)
Specified by:
setLogger in interface org.apache.avalon.framework.logger.Loggable

initialize

protected void initialize()
                   throws java.lang.Exception

newPoolable

protected Poolable newPoolable()
                        throws java.lang.Exception

removePoolable

protected void removePoolable(Poolable)

size

public final int size()

get

public abstract Poolable get()
                      throws java.lang.Exception
Specified by:
get in interface Pool

put

public abstract void put(Poolable)
Specified by:
put in interface Pool

internalGrow

protected void internalGrow(int)
                     throws java.lang.Exception

internalShrink

protected void internalShrink(int)
                       throws java.lang.Exception


Copyright 2001 Apache Jakarta Project. All Rights Reserved.