org.apache.avalon.excalibur.pool
Class SoftResourceLimitingPool

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.avalon.excalibur.pool.AbstractPool
          extended by org.apache.avalon.excalibur.pool.DefaultPool
              extended by org.apache.avalon.excalibur.pool.SoftResourceLimitingPool
All Implemented Interfaces:
Pool, Resizable, Disposable, LogEnabled, ThreadSafe
Direct Known Subclasses:
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(Class clazz, int initial)
           
SoftResourceLimitingPool(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 Exception
Create an SoftResourceLimitingPool. The pool requires a factory.

Throws:
Exception

SoftResourceLimitingPool

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

Throws:
Exception

SoftResourceLimitingPool

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

Throws:
Exception

SoftResourceLimitingPool

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

Throws:
Exception

SoftResourceLimitingPool

public SoftResourceLimitingPool(Class clazz,
                                int initial,
                                int maximum)
                         throws NoSuchMethodException,
                                Exception
Throws:
NoSuchMethodException
Exception

SoftResourceLimitingPool

public SoftResourceLimitingPool(Class clazz,
                                int initial)
                         throws NoSuchMethodException,
                                Exception
Throws:
NoSuchMethodException
Exception
Method Detail

initialize

public void initialize()
                throws Exception
Overrides:
initialize in class AbstractPool
Throws:
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-2012 Apache Software Foundation. All Rights Reserved.