|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.excalibur.mpool.BlockingFixedSizePool
This is an Pool
that caches Poolable objects for reuse.
Please note that this pool offers no resource limiting whatsoever.
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()
Acquire an instance of the pooled object. |
void |
dispose()
|
void |
initialize()
|
Object |
newInstance()
Create a new instance of the object being pooled. |
void |
release(Object object)
Release the instance of the pooled object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected final Object m_semaphore
Constructor Detail |
public BlockingFixedSizePool(ObjectFactory factory, int size) throws Exception
public BlockingFixedSizePool(ObjectFactory factory, int size, long timeout) throws Exception
Method Detail |
public void initialize() throws Exception
initialize
in interface Initializable
Exception
public Object acquire()
Pool
acquire
in interface Pool
public void release(Object object)
Pool
release
in interface Pool
object
- The pooled object to release to the pool.public Object newInstance() throws Exception
Pool
newInstance
in interface Pool
Exception
- if the instance cannot be createdpublic void dispose()
dispose
in interface Disposable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |