org.ow2.util.pool.impl.enhanced.impl.basic.clue
Class BasicCluePool<E,C>

java.lang.Object
  extended by org.ow2.util.pool.impl.enhanced.impl.basic.BasicPool<E>
      extended by org.ow2.util.pool.impl.enhanced.impl.basic.clue.BasicCluePool<E,C>
Type Parameters:
E - pool item type
C - clue type type of clue
All Implemented Interfaces:
IBasicCluePool<E,C>, IBasicPool<E>, ICluePool<E,C>, IPool<E>, IResizableCluePool<E,C>, IResizablePool<E>, IResizable

public class BasicCluePool<E,C>
extends BasicPool<E>
implements IBasicCluePool<E,C>

Author:
Gael Lalire

Field Summary
 
Fields inherited from class org.ow2.util.pool.impl.enhanced.impl.basic.BasicPool
INFINITE_WAIT_CONTROL
 
Constructor Summary
BasicCluePool(IPoolItemFactory<? extends E> poolItemFactory, int initPoolSize, IClueAccessManager<? super E,? super C> clueAccessManager, java.util.concurrent.Executor createItemExecutor, IPoolItemRemoveListener<? super E> poolItemRemoveCB, java.util.concurrent.Executor removeItemExecutor)
           
 
Method Summary
 E get(C clue)
           
 E get(C clue, IWaitControl timeout)
           
 E get(IWaitControl timeout)
          Get behavior is not the same.
protected  int getOneItem(C clue)
           
 
Methods inherited from class org.ow2.util.pool.impl.enhanced.impl.basic.BasicPool
callNextRemoveCallBack, clearPool, createNewItem, createOneItem, get, getAvailablePoolItemList, getDelayedCount, getExpectedSize, getFactoryState, getLock, getOneItem, getPoolItemFactory, getReleaseListener, getSignalClearableCondition, getTemporaryBrokenFactoryEndTime, getUnmodifiableAvailablePoolItemList, getUnUsedPoolItem, getUsedPoolItem, lockSizeToZero, put, putOneItem, releaseOneItem, releasePoolItem, remove, removeOneItem, setDelayedCount, setExpectedSize, setUsedPoolItem, signalAllWaiters, unlockSizeToZero, waitAllRemoveListenerCompleted
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.ow2.util.pool.impl.enhanced.api.basic.IBasicPool
clearPool, get, lockSizeToZero, unlockSizeToZero, waitAllRemoveListenerCompleted
 
Methods inherited from interface org.ow2.util.pool.impl.enhanced.api.IPool
put, remove, signalAllWaiters
 
Methods inherited from interface org.ow2.util.pool.impl.enhanced.internal.resizer.api.IResizable
setExpectedSize
 
Methods inherited from interface org.ow2.util.pool.impl.enhanced.api.IPool
put, remove, signalAllWaiters
 

Constructor Detail

BasicCluePool

public BasicCluePool(IPoolItemFactory<? extends E> poolItemFactory,
                     int initPoolSize,
                     IClueAccessManager<? super E,? super C> clueAccessManager,
                     java.util.concurrent.Executor createItemExecutor,
                     IPoolItemRemoveListener<? super E> poolItemRemoveCB,
                     java.util.concurrent.Executor removeItemExecutor)
Method Detail

get

public E get(IWaitControl timeout)
      throws TimeoutPoolException,
             IllegalTimeoutException,
             WaiterInterruptedException,
             PoolFactoryBroken,
             java.lang.InterruptedException
Get behavior is not the same.

Specified by:
get in interface IBasicPool<E>
Specified by:
get in interface IPool<E>
Overrides:
get in class BasicPool<E>
Parameters:
timeout - after this timeout a exception is thrown
Returns:
a pool item
Throws:
WaiterInterruptedException
TimeoutPoolException - if timeout
IllegalTimeoutException
PoolFactoryBroken
java.lang.InterruptedException

get

public E get(C clue)
      throws WaiterInterruptedException,
             PoolFactoryBroken,
             java.lang.InterruptedException
Specified by:
get in interface IBasicCluePool<E,C>
Throws:
WaiterInterruptedException
PoolFactoryBroken
java.lang.InterruptedException

getOneItem

protected int getOneItem(C clue)

get

public E get(C clue,
             IWaitControl timeout)
      throws TimeoutPoolException,
             IllegalTimeoutException,
             WaiterInterruptedException,
             PoolFactoryBroken,
             java.lang.InterruptedException
Specified by:
get in interface IBasicCluePool<E,C>
Specified by:
get in interface ICluePool<E,C>
Throws:
TimeoutPoolException
IllegalTimeoutException
WaiterInterruptedException
PoolFactoryBroken
java.lang.InterruptedException


Copyright © 2007-2009 OW2 Consortium. All Rights Reserved.