org.apache.excalibur.mpool
Class BlockingFixedSizePool
java.lang.Object
org.apache.excalibur.mpool.BlockingFixedSizePool
- All Implemented Interfaces:
- org.apache.avalon.framework.activity.Disposable, org.apache.avalon.framework.activity.Initializable, org.apache.excalibur.mpool.Pool
public final class BlockingFixedSizePool
- extends java.lang.Object
- implements org.apache.excalibur.mpool.Pool, org.apache.avalon.framework.activity.Disposable, org.apache.avalon.framework.activity.Initializable
This is an Pool
that caches Poolable objects for reuse.
Please note that this pool offers no resource limiting whatsoever.
- Since:
- 4.1
- Version:
- CVS $Revision: 1.4 $ $Date: 2004/02/28 11:47:34 $
- Author:
- Avalon Development Team
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
m_disposed
private boolean m_disposed
m_buffer
private final org.apache.commons.collections.Buffer m_buffer
m_factory
private final org.apache.excalibur.mpool.ObjectFactory m_factory
m_timeout
private final long m_timeout
m_maxSize
private final int m_maxSize
m_semaphore
protected final java.lang.Object m_semaphore
- The semaphor we synchronize on
BlockingFixedSizePool
public BlockingFixedSizePool(org.apache.excalibur.mpool.ObjectFactory factory,
int size)
throws java.lang.Exception
- Throws:
java.lang.Exception
BlockingFixedSizePool
public BlockingFixedSizePool(org.apache.excalibur.mpool.ObjectFactory factory,
int size,
long timeout)
throws java.lang.Exception
- Throws:
java.lang.Exception
initialize
public void initialize()
throws java.lang.Exception
- Specified by:
initialize
in interface org.apache.avalon.framework.activity.Initializable
- Throws:
java.lang.Exception
acquire
public java.lang.Object acquire()
- Specified by:
acquire
in interface org.apache.excalibur.mpool.Pool
release
public void release(java.lang.Object object)
- Specified by:
release
in interface org.apache.excalibur.mpool.Pool
newInstance
public java.lang.Object newInstance()
throws java.lang.Exception
- Specified by:
newInstance
in interface org.apache.excalibur.mpool.Pool
- Throws:
java.lang.Exception
dispose
public void dispose()
- Specified by:
dispose
in interface org.apache.avalon.framework.activity.Disposable