org.apache.avalon.excalibur.pool
Class SoftResourceLimitingPool

java.lang.Object
  extended byorg.apache.avalon.framework.logger.AbstractLogEnabled
      extended byorg.apache.avalon.excalibur.pool.AbstractPool
          extended byorg.apache.avalon.excalibur.pool.DefaultPool
              extended byorg.apache.avalon.excalibur.pool.SoftResourceLimitingPool
All Implemented Interfaces:
Disposable, LogEnabled, Pool, Resizable, ThreadSafe
Direct Known Subclasses:
DefaultComponentPool, HardResourceLimitingPool

public class SoftResourceLimitingPool
extends DefaultPool
implements Resizable

This is an Pool that caches Poolable objects for reuse.

Since:
4.0
Version:
CVS $Revision: 1.5 $ $Date: 2004/03/29 16:50:37 $
Author:
Avalon Development Team

Field Summary
 
Fields inherited from class org.apache.avalon.excalibur.pool.DefaultPool
m_controller, m_disposed, m_max, m_min, m_quickFail
 
Fields inherited from class org.apache.avalon.excalibur.pool.AbstractPool
DEFAULT_POOL_SIZE, m_active, m_factory, m_initialized, m_mutex, m_ready
 
Constructor Summary
SoftResourceLimitingPool(java.lang.Class clazz, int initial)
           
SoftResourceLimitingPool(java.lang.Class clazz, int initial, int maximum)
           
SoftResourceLimitingPool(ObjectFactory factory)
          Create an SoftResourceLimitingPool.
SoftResourceLimitingPool(ObjectFactory factory, int min)
          Create an SoftResourceLimitingPool.
SoftResourceLimitingPool(ObjectFactory factory, int min, int max)
          Create an SoftResourceLimitingPool.
SoftResourceLimitingPool(ObjectFactory factory, PoolController controller, int min, int max)
          Create an SoftResourceLimitingPool.
 
Method Summary
 void grow(int amount)
           
 void initialize()
           
 void shrink(int amount)
           
 
Methods inherited from class org.apache.avalon.excalibur.pool.DefaultPool
dispose, get, put
 
Methods inherited from class org.apache.avalon.excalibur.pool.AbstractPool
internalGrow, internalShrink, lock, newPoolable, removePoolable, size, unlock
 
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
 

Constructor Detail

SoftResourceLimitingPool

public SoftResourceLimitingPool(ObjectFactory factory)
                         throws java.lang.Exception
Create an SoftResourceLimitingPool. The pool requires a factory.


SoftResourceLimitingPool

public SoftResourceLimitingPool(ObjectFactory factory,
                                int min)
                         throws java.lang.Exception
Create an SoftResourceLimitingPool. The pool requires a factory, and can optionally have a controller.


SoftResourceLimitingPool

public SoftResourceLimitingPool(ObjectFactory factory,
                                int min,
                                int max)
                         throws java.lang.Exception
Create an SoftResourceLimitingPool. The pool requires a factory, and can optionally have a controller.


SoftResourceLimitingPool

public SoftResourceLimitingPool(ObjectFactory factory,
                                PoolController controller,
                                int min,
                                int max)
                         throws java.lang.Exception
Create an SoftResourceLimitingPool. The pool requires a factory, and can optionally have a controller.


SoftResourceLimitingPool

public SoftResourceLimitingPool(java.lang.Class clazz,
                                int initial,
                                int maximum)
                         throws java.lang.NoSuchMethodException,
                                java.lang.Exception

SoftResourceLimitingPool

public SoftResourceLimitingPool(java.lang.Class clazz,
                                int initial)
                         throws java.lang.NoSuchMethodException,
                                java.lang.Exception
Method Detail

initialize

public void initialize()
                throws java.lang.Exception
Overrides:
initialize in class AbstractPool
Throws:
java.lang.Exception

grow

public void grow(int amount)
Specified by:
grow in interface Resizable

shrink

public void shrink(int amount)
Specified by:
shrink in interface Resizable


Copyright © 1997-2005 The Apache Software Foundation. All Rights Reserved.