|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ow2.util.pool.impl.enhanced.impl.listener.PoolListenerDispatcherPool<E>
E - pool item typepublic class PoolListenerDispatcherPool<E>
| Constructor Summary | |
|---|---|
PoolListenerDispatcherPool(IPool<E> pool)
|
|
| Method Summary | |
|---|---|
void |
addPoolListener(IPoolListener<E> poolListener)
|
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 |
removePoolListener(IPoolListener<E> poolListener)
|
void |
signalAllWaiters()
Ask pool to recall all timeout.waitOnXXX. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PoolListenerDispatcherPool(IPool<E> pool)
| Method Detail |
|---|
public E get(IWaitControl timeout)
throws PoolException,
java.lang.InterruptedException
IPool
get in interface IPool<E>timeout - if the get wait more than timeout then the method
throw a TimeoutPoolException.
PoolException - if error occurs
java.lang.InterruptedExceptionpublic void signalAllWaiters()
IPoolWaitAuthorization
state you can avoid all waiters.
signalAllWaiters in interface IPool<E>
public void put(E poolItem)
throws NotABusyPoolItemException
IPool
put in interface IPool<E>poolItem - a pool item
NotABusyPoolItemException - if error occurs
public void remove(E poolItem)
throws NotABusyPoolItemException
IPool
remove in interface IPool<E>poolItem - a pool item
NotABusyPoolItemException - if error occurspublic void addPoolListener(IPoolListener<E> poolListener)
public void removePoolListener(IPoolListener<E> poolListener)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||