|
||||||||||
| 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.keepbusy.KeepBusyPool<E>
E - pool item typepublic class KeepBusyPool<E>
| Constructor Summary | |
|---|---|
KeepBusyPool(IPool<E> pool)
|
|
KeepBusyPool(IPool<E> pool,
ReferenceType referenceType)
|
|
| Method Summary | |
|---|---|
protected void |
expunge()
|
E |
get(IWaitControl timeout)
This method block is there is no available pool item in the pool. |
protected java.util.Map<IIdentityReference<E>,PoolItemInfo> |
getBusyPoolItemList()
|
protected WaitAuthorization |
getCurrentWaitAuthorization()
|
protected java.util.concurrent.locks.Lock |
getLock()
|
protected java.lang.ref.ReferenceQueue<E> |
getReferenceQueue()
|
protected ReferenceType |
getReferenceType()
|
ShareMethod |
getShareMethod()
|
protected ShareMethod |
getShareMethod0()
|
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 |
removeAll()
|
protected void |
setCurrentWaitAuthorization(WaitAuthorization currentWaitAuthorization)
|
void |
setShareMethod(ShareMethod shareMethod)
|
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 KeepBusyPool(IPool<E> pool)
public KeepBusyPool(IPool<E> pool,
ReferenceType referenceType)
| Method Detail |
|---|
protected void expunge()
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.InterruptedException
public void put(E poolItem)
throws NotABusyPoolItemException
IPool
put in interface IPool<E>poolItem -
PoolException
NotABusyPoolItemException - if error occursprotected ShareMethod getShareMethod0()
public ShareMethod getShareMethod()
public void setShareMethod(ShareMethod shareMethod)
shareMethod - the shareMethod to setpublic void signalAllWaiters()
IPoolWaitAuthorization
state you can avoid all waiters.
signalAllWaiters in interface IPool<E>
public void remove(E poolItem)
throws NotABusyPoolItemException
IPool
remove in interface IPool<E>poolItem - a pool item
NotABusyPoolItemException - if error occursprotected java.util.Map<IIdentityReference<E>,PoolItemInfo> getBusyPoolItemList()
protected final java.util.concurrent.locks.Lock getLock()
public void removeAll()
protected java.lang.ref.ReferenceQueue<E> getReferenceQueue()
protected ReferenceType getReferenceType()
protected WaitAuthorization getCurrentWaitAuthorization()
protected void setCurrentWaitAuthorization(WaitAuthorization currentWaitAuthorization)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||