org.ow2.util.pool.impl.enhanced.impl.limited.clue
Class LimitedWaiterCluePool<E,C>
java.lang.Object
org.ow2.util.pool.impl.enhanced.impl.limited.LimitedWaiterPool<E>
org.ow2.util.pool.impl.enhanced.impl.limited.clue.LimitedWaiterCluePool<E,C>
- Type Parameters:
E - pool item typeC - clue type
- All Implemented Interfaces:
- ICluePool<E,C>, IPool<E>
public class LimitedWaiterCluePool<E,C>
- extends LimitedWaiterPool<E>
- implements ICluePool<E,C>
- Author:
- Gael Lalire
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LimitedWaiterCluePool
public LimitedWaiterCluePool(ICluePool<E,C> cluePool)
LimitedWaiterCluePool
public LimitedWaiterCluePool(ICluePool<E,C> cluePool,
int maxWaiter)
LimitedWaiterCluePool
public LimitedWaiterCluePool(ICluePool<E,C> cluePool,
int maxWaiter,
int maxClueWaiter,
int maxNoClueWaiter)
get
public E get(IWaitControl timeout)
throws PoolException,
java.lang.InterruptedException
- Description copied from interface:
IPool
- This method block is there is no available pool item
in the pool.
- Specified by:
get in interface IPool<E>- Overrides:
get in class LimitedWaiterPool<E>
- Parameters:
timeout - if the get wait more than timeout then the method
throw a TimeoutPoolException.
- Returns:
- a pool item
- Throws:
PoolException - if error occurs
java.lang.InterruptedException
addClueWaiter
protected void addClueWaiter()
throws TooManyWaiterException
- Throws:
TooManyWaiterException
removeClueWaiter
protected void removeClueWaiter()
throws TooManyWaiterException
- Throws:
TooManyWaiterException
addNoClueWaiter
protected void addNoClueWaiter()
throws TooManyWaiterException
- Throws:
TooManyWaiterException
removeNoClueWaiter
protected void removeNoClueWaiter()
throws TooManyWaiterException
- Throws:
TooManyWaiterException
get
public E get(C clue,
IWaitControl timeout)
throws PoolException,
java.lang.InterruptedException
- Specified by:
get in interface ICluePool<E,C>
- Throws:
PoolException
java.lang.InterruptedException
waitEmptyClueWaiterInPool
public void waitEmptyClueWaiterInPool()
throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
waitEmptyNoClueWaiterInPool
public void waitEmptyNoClueWaiterInPool()
throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
Copyright © 2007-2009 OW2 Consortium. All Rights Reserved.