org.ow2.util.pool.impl.enhanced.api.basic
Interface IBasicPool<E>

Type Parameters:
E - pool item type
All Superinterfaces:
IPool<E>, IResizable, IResizablePool<E>
All Known Subinterfaces:
IBasicCluePool<E,C>
All Known Implementing Classes:
BasicCluePool, BasicPool

public interface IBasicPool<E>
extends IResizablePool<E>

Author:
Gael Lalire

Method Summary
 void clearPool()
          After calling this method the pool will have a zero size and no item will be created until setExpectedSize will be called again.
 E get()
          This method block is there is no available pool item in the pool.
 E get(IWaitControl timeout)
          This method block is there is no available pool item in the pool.
 void lockSizeToZero()
           
 void unlockSizeToZero()
           
 void waitAllRemoveListenerCompleted()
          After calling this method all pending remove calls will be called.
 
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
 

Method Detail

get

E get()
      throws WaiterInterruptedException,
             PoolFactoryBroken,
             java.lang.InterruptedException
This method block is there is no available pool item in the pool. It is same as get(INFINITE_TIMEOUT);

Returns:
a pool item
Throws:
WaiterInterruptedException - if error occurs
PoolFactoryBroken
java.lang.InterruptedException

get

E get(IWaitControl timeout)
      throws TimeoutPoolException,
             IllegalTimeoutException,
             WaiterInterruptedException,
             PoolFactoryBroken,
             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>
Parameters:
timeout - if the get wait more than timeout then the method throw a TimeoutPoolException.
Returns:
a pool item
Throws:
TimeoutPoolException
IllegalTimeoutException
WaiterInterruptedException
PoolFactoryBroken
java.lang.InterruptedException

clearPool

void clearPool()
               throws java.lang.InterruptedException
After calling this method the pool will have a zero size and no item will be created until setExpectedSize will be called again.

Throws:
java.lang.InterruptedException

waitAllRemoveListenerCompleted

void waitAllRemoveListenerCompleted()
                                    throws java.lang.InterruptedException
After calling this method all pending remove calls will be called.

Throws:
java.lang.InterruptedException

lockSizeToZero

void lockSizeToZero()

unlockSizeToZero

void unlockSizeToZero()


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