|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
E - pool item typepublic interface IPool<E>
A pool is a class which keep some pool item.
| Method Summary | |
|---|---|
E |
get(IWaitControl timeout)
This method block is there is no available pool item in the pool. |
void |
put(E poolItem)
This method must be called when you finished to use the pool item. |
void |
remove(E poolItem)
This method can be called when you finished to use the pool item instead of put method. |
void |
signalAllWaiters()
Ask pool to recall all timeout.waitOnXXX. |
| Method Detail |
|---|
E get(IWaitControl timeout)
throws PoolException,
java.lang.InterruptedException
timeout - if the get wait more than timeout then the method
throw a TimeoutPoolException.
PoolException - if error occurs
java.lang.InterruptedException
void put(E poolItem)
throws NotABusyPoolItemException
poolItem - a pool item
NotABusyPoolItemException - if error occurs
void remove(E poolItem)
throws NotABusyPoolItemException
poolItem - a pool item
NotABusyPoolItemException - if error occursvoid signalAllWaiters()
WaitAuthorization
state you can avoid all waiters.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||