org.apache.excalibur.mpool
Class BlockingFixedSizePool

java.lang.Object
  extended byorg.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

Field Summary
protected  java.lang.Object m_semaphore
          The semaphor we synchronize on
 
Constructor Summary
BlockingFixedSizePool(org.apache.excalibur.mpool.ObjectFactory factory, int size)
           
BlockingFixedSizePool(org.apache.excalibur.mpool.ObjectFactory factory, int size, long timeout)
           
 
Method Summary
 java.lang.Object acquire()
           
 void dispose()
           
 void initialize()
           
 java.lang.Object newInstance()
           
 void release(java.lang.Object object)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_semaphore

protected final java.lang.Object m_semaphore
The semaphor we synchronize on

Constructor Detail

BlockingFixedSizePool

public BlockingFixedSizePool(org.apache.excalibur.mpool.ObjectFactory factory,
                             int size)
                      throws java.lang.Exception

BlockingFixedSizePool

public BlockingFixedSizePool(org.apache.excalibur.mpool.ObjectFactory factory,
                             int size,
                             long timeout)
                      throws java.lang.Exception
Method Detail

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


Copyright © {inceptionYear}-2007 Apache Software Foundation. All Rights Reserved.