org.ow2.util.pool.impl.enhanced
Class EnhancedCluePool<E,C>
java.lang.Object
org.ow2.util.pool.impl.enhanced.EnhancedCluePool<E,C>
- Type Parameters:
E - C -
- All Implemented Interfaces:
- org.ow2.util.pool.api.Pool<E,C>
public class EnhancedCluePool<E,C>
- extends java.lang.Object
- implements org.ow2.util.pool.api.Pool<E,C>
- Author:
- Gael Lalire
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EnhancedCluePool
public EnhancedCluePool(ICluePoolManager<E,C> cluePoolManager)
EnhancedCluePool
public EnhancedCluePool(ICluePoolManager<E,C> cluePoolManager,
ResizerType resizerType,
ISharedManager sharedManager,
java.util.concurrent.Executor createAndRemoveItemExecutor)
createWaitControl
protected IWaitControl createWaitControl()
get
public E get()
throws org.ow2.util.pool.api.PoolException
- Specified by:
get in interface org.ow2.util.pool.api.Pool<E,C>
- Throws:
org.ow2.util.pool.api.PoolException
get
public E get(C clue)
throws org.ow2.util.pool.api.PoolException
- Specified by:
get in interface org.ow2.util.pool.api.Pool<E,C>
- Throws:
org.ow2.util.pool.api.PoolException
discard
public void discard(E instance)
throws org.ow2.util.pool.api.PoolException
- Specified by:
discard in interface org.ow2.util.pool.api.Pool<E,C>
- Throws:
org.ow2.util.pool.api.PoolException
release
public void release(E instance)
throws org.ow2.util.pool.api.PoolException
- Specified by:
release in interface org.ow2.util.pool.api.Pool<E,C>
- Throws:
org.ow2.util.pool.api.PoolException
updatePoolSize
public void updatePoolSize()
- If you do not want to wait an action which resize the pool to create future needed pool item.
This method can be use after a failed stop() to reconstruct missing items.
Also after construction and start() ...
setPoolConfiguration
public void setPoolConfiguration(org.ow2.util.pool.api.IPoolConfiguration poolConfiguration)
- Specified by:
setPoolConfiguration in interface org.ow2.util.pool.api.Pool<E,C>
setAllowSharedInstance
public void setAllowSharedInstance(boolean allowSharedInstance)
- Allow to share instances (shouldn't be use in stateful case as one
stateful ID is linked to one client. No Stateful with same ID are
authorized).
- Parameters:
allowSharedInstance - true if it is allowed, else false.
isAllowSharedInstance
public boolean isAllowSharedInstance()
- Return true if many instances of the same object can be created (when
pool is not full).
- Returns:
- true if this is allowed.
start
public void start()
throws org.ow2.util.pool.api.PoolException
- Specified by:
start in interface org.ow2.util.pool.api.Pool<E,C>
- Throws:
org.ow2.util.pool.api.PoolException
forceStop
public void forceStop()
throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
stop
public void stop()
throws org.ow2.util.pool.api.PoolException
- Specified by:
stop in interface org.ow2.util.pool.api.Pool<E,C>
- Throws:
org.ow2.util.pool.api.PoolException
Copyright © 2007-2009 OW2 Consortium. All Rights Reserved.