|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Pool
Pool defines the methods that can be used by the application to access pooled objects. The basic assumption is that all objects in the pool are identical (homogeneous). This interface defines methods for a) getting an object from the pool, b) returning an object back to the pool and, c) destroying (instead of reusing) an object. In addition to these methods, the Pool has methods for adding and removing PoolEventListeners. There are six overloaded methods for getting objects from a pool.
| Method Summary | |
|---|---|
void |
destroyObject(java.lang.Object obj)
Destroys an Object. |
java.lang.Object |
getObject(boolean canWait,
java.lang.Object param)
Deprecated. |
java.lang.Object |
getObject(long maxWaitTime,
java.lang.Object param)
Deprecated. |
java.lang.Object |
getObject(java.lang.Object param)
Get an object from the pool within the specified time. |
void |
returnObject(java.lang.Object obj)
Return an object back to the pool. |
| Method Detail |
|---|
java.lang.Object getObject(boolean canWait,
java.lang.Object param)
throws PoolException
PoolException
java.lang.Object getObject(long maxWaitTime,
java.lang.Object param)
throws PoolException
PoolException
java.lang.Object getObject(java.lang.Object param)
throws PoolException
The - amount of time the calling thread agrees to wait.Some - value that might be used while creating the object
Throws - PoolException if an object cannot be created
PoolExceptionvoid returnObject(java.lang.Object obj)
void destroyObject(java.lang.Object obj)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||