|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.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 java.lang.Object |
m_semaphore
The semaphor we synchronize on |
| Constructor Summary | |
BlockingFixedSizePool(ObjectFactory factory,
int size)
|
|
BlockingFixedSizePool(ObjectFactory factory,
int size,
long timeout)
|
|
| Method Summary | |
java.lang.Object |
acquire()
Acquire an instance of the pooled object. |
void |
dispose()
The dispose operation is called at the end of a components lifecycle. |
void |
initialize()
Initialize the component. |
java.lang.Object |
newInstance()
Create a new instance of the object being pooled. |
void |
release(java.lang.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 java.lang.Object m_semaphore
| Constructor Detail |
public BlockingFixedSizePool(ObjectFactory factory,
int size)
throws java.lang.Exception
public BlockingFixedSizePool(ObjectFactory factory,
int size,
long timeout)
throws java.lang.Exception
| Method Detail |
public void initialize()
throws java.lang.Exception
Initializable
initialize in interface Initializablejava.lang.Exception - if an error occurspublic java.lang.Object acquire()
Pool
acquire in interface Poolpublic void release(java.lang.Object object)
Pool
release in interface Poolobject - The pooled object to release to the pool.
public java.lang.Object newInstance()
throws java.lang.Exception
Pool
newInstance in interface Pooljava.lang.Exception - if the instance cannot be createdpublic void dispose()
Disposable
dispose in interface Disposable
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||