|
||||||||||
| 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.validator.ValidatorPool<E>
E - pool item typepublic class ValidatorPool<E>
| Constructor Summary | |
|---|---|
ValidatorPool(IPool<E> pool,
IPoolValidator<E> poolValidator,
boolean putValidate)
|
|
| 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. |
protected boolean |
validateOneItem(E poolItem)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ValidatorPool(IPool<E> pool,
IPoolValidator<E> poolValidator,
boolean putValidate)
| Method Detail |
|---|
protected boolean validateOneItem(E poolItem)
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 occurs
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||