org.apache.avalon.excalibur.pool
Class DefaultPool
java.lang.Object
|
+--org.apache.avalon.framework.logger.AbstractLoggable
|
+--org.apache.avalon.excalibur.pool.AbstractPool
|
+--org.apache.avalon.excalibur.pool.DefaultPool
- All Implemented Interfaces:
- Component, Disposable, Loggable, Pool, ThreadSafe
- Direct Known Subclasses:
- SoftResourceLimitingPool
- public class DefaultPool
- extends AbstractPool
- implements Disposable
This is an Pool
that caches Poolable objects for reuse.
Please note that this pool offers no resource limiting whatsoever.
- Version:
- CVS $Revision: 1.7 $ $Date: 2001/05/08 15:12:53 $
- Author:
- Berin Loritsch, Stefano Mazzocchi, Peter Donald
Method Summary |
void |
dispose()
The dispose operation will be invoked by a client on completion
of the useful life of instance. |
Poolable |
get()
|
void |
put(Poolable obj)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
m_min
protected int m_min
m_max
protected int m_max
m_controller
protected PoolController m_controller
m_disposed
protected boolean m_disposed
DefaultPool
public DefaultPool(ObjectFactory factory,
PoolController controller)
throws java.lang.Exception
DefaultPool
public DefaultPool(ObjectFactory factory,
PoolController controller,
int initial,
int maximum)
throws java.lang.Exception
DefaultPool
public DefaultPool(ObjectFactory factory)
throws java.lang.Exception
DefaultPool
public DefaultPool(java.lang.Class clazz,
int initial,
int maximum)
throws java.lang.NoSuchMethodException,
java.lang.Exception
DefaultPool
public DefaultPool(java.lang.Class clazz,
int initial)
throws java.lang.NoSuchMethodException,
java.lang.Exception
get
public Poolable get()
throws java.lang.Exception
- Overrides:
get
in class AbstractPool
put
public final void put(Poolable obj)
- Overrides:
put
in class AbstractPool
dispose
public final void dispose()
throws java.lang.Exception
- Description copied from interface:
Disposable
- The dispose operation will be invoked by a client on completion
of the useful life of instance. This method is guaranteed to be called
after the stop() method if the Component supports the
Stoppable
interface. This method is responsible for
releaseing/destroying any resources aquired by the Component
during it's lifecycle.
- Specified by:
dispose
in interface Disposable
Copyright © 2001 Apache Jakarta Project. All Rights Reserved.