org.apache.avalon.excalibur.pool
Class HardResourceLimitingPool

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
                  extended byorg.apache.avalon.excalibur.pool.HardResourceLimitingPool
All Implemented Interfaces:
Disposable, Initializable, LogEnabled, Pool, Resizable, ThreadSafe
Direct Known Subclasses:
JdbcConnectionPool

public class HardResourceLimitingPool
extends SoftResourceLimitingPool
implements ThreadSafe, Initializable

This is a implementation of Pool that is thread safe.

Since:
4.0
Version:
CVS $Revision: 1.6 $ $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
HardResourceLimitingPool(java.lang.Class clazz, int initial)
           
HardResourceLimitingPool(java.lang.Class clazz, int initial, int maximum)
           
HardResourceLimitingPool(ObjectFactory factory)
           
HardResourceLimitingPool(ObjectFactory factory, int initial)
           
HardResourceLimitingPool(ObjectFactory factory, int initial, int maximum)
           
HardResourceLimitingPool(ObjectFactory factory, PoolController controller)
           
HardResourceLimitingPool(ObjectFactory factory, PoolController controller, int max)
           
HardResourceLimitingPool(ObjectFactory factory, PoolController controller, int initial, int max)
           
 
Method Summary
 void initialize()
          Initialize the component.
protected  void internalGrow(int amount)
           
protected  Poolable newPoolable()
          This is the method to override when you need to enforce creational policies.
 
Methods inherited from class org.apache.avalon.excalibur.pool.SoftResourceLimitingPool
grow, shrink
 
Methods inherited from class org.apache.avalon.excalibur.pool.DefaultPool
dispose, get, put
 
Methods inherited from class org.apache.avalon.excalibur.pool.AbstractPool
internalShrink, lock, 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

HardResourceLimitingPool

public HardResourceLimitingPool(ObjectFactory factory,
                                PoolController controller)
                         throws java.lang.Exception

HardResourceLimitingPool

public HardResourceLimitingPool(ObjectFactory factory,
                                PoolController controller,
                                int max)
                         throws java.lang.Exception

HardResourceLimitingPool

public HardResourceLimitingPool(ObjectFactory factory,
                                PoolController controller,
                                int initial,
                                int max)
                         throws java.lang.Exception

HardResourceLimitingPool

public HardResourceLimitingPool(ObjectFactory factory)
                         throws java.lang.Exception

HardResourceLimitingPool

public HardResourceLimitingPool(ObjectFactory factory,
                                int initial,
                                int maximum)
                         throws java.lang.Exception

HardResourceLimitingPool

public HardResourceLimitingPool(ObjectFactory factory,
                                int initial)
                         throws java.lang.Exception

HardResourceLimitingPool

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

HardResourceLimitingPool

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

initialize

public void initialize()
Description copied from interface: Initializable
Initialize the component. Initialization includes allocating any resources required throughout the component's lifecycle.

Specified by:
initialize in interface Initializable
Overrides:
initialize in class SoftResourceLimitingPool

newPoolable

protected Poolable newPoolable()
                        throws java.lang.Exception
Description copied from class: AbstractPool
This is the method to override when you need to enforce creational policies.

Overrides:
newPoolable in class AbstractPool
Throws:
java.lang.Exception

internalGrow

protected void internalGrow(int amount)
                     throws java.lang.Exception
Overrides:
internalGrow in class AbstractPool
Throws:
java.lang.Exception


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