org.apache.excalibur.mpool
Class BlockingFixedSizePool

java.lang.Object
  extended by org.apache.excalibur.mpool.BlockingFixedSizePool
All Implemented Interfaces:
Disposable, Initializable, Pool

public final class BlockingFixedSizePool
extends Object
implements Pool, Disposable, 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  Object m_semaphore
          The semaphor we synchronize on
 
Constructor Summary
BlockingFixedSizePool(ObjectFactory factory, int size)
           
BlockingFixedSizePool(ObjectFactory factory, int size, long timeout)
           
 
Method Summary
 Object acquire()
           
 void dispose()
           
 void initialize()
           
 Object newInstance()
           
 void release(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 Object m_semaphore
The semaphor we synchronize on

Constructor Detail

BlockingFixedSizePool

public BlockingFixedSizePool(ObjectFactory factory,
                             int size)
                      throws Exception
Throws:
Exception

BlockingFixedSizePool

public BlockingFixedSizePool(ObjectFactory factory,
                             int size,
                             long timeout)
                      throws Exception
Throws:
Exception
Method Detail

initialize

public void initialize()
                throws Exception
Specified by:
initialize in interface Initializable
Throws:
Exception

acquire

public Object acquire()
Specified by:
acquire in interface Pool

release

public void release(Object object)
Specified by:
release in interface Pool

newInstance

public Object newInstance()
                   throws Exception
Specified by:
newInstance in interface Pool
Throws:
Exception

dispose

public void dispose()
Specified by:
dispose in interface Disposable


Copyright © 2012 Apache Software Foundation. All Rights Reserved.