public interface Pool
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
acquire()
Acquire an instance of the pooled object.
|
void |
addPoolListener(PoolListener listener)
Add a pool listener to the pool.
|
void |
release(java.lang.Object pooledObject)
Release the instance of the pooled object.
|
void |
removePoolListener(PoolListener listener)
Remove a pool listener from the pool.
|
java.lang.Object acquire()
throws java.lang.Exception
java.lang.Exception - if the Pool is not able to return an object.void release(java.lang.Object pooledObject)
pooledObject - The pooled object to release to the pool.void addPoolListener(PoolListener listener)
listener - the listener to add.void removePoolListener(PoolListener listener)
listener - the listener to remove