org.ow2.util.pool.impl.enhanced
Class EnhancedPoolFactory

java.lang.Object
  extended by org.ow2.util.pool.impl.enhanced.EnhancedPoolFactory

public class EnhancedPoolFactory
extends java.lang.Object

Author:
Gael Lalire

Constructor Summary
EnhancedPoolFactory(IPool<IReusableThread> pool)
           
 
Method Summary
<E> EnhancedPool<E>
createEnhancedPool(IPoolManager<E> poolManager)
          You should use this method to create EnhancedPool.
<E> EnhancedPool<E>
createEnhancedPool(IPoolManager<E> poolManager, boolean setSizeShared, boolean schedulerShared)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnhancedPoolFactory

public EnhancedPoolFactory(IPool<IReusableThread> pool)
Method Detail

createEnhancedPool

public <E> EnhancedPool<E> createEnhancedPool(IPoolManager<E> poolManager)
You should use this method to create EnhancedPool.

Type Parameters:
E - pool item type
Parameters:
poolManager - a pool manager
Returns:
a new pool

createEnhancedPool

public <E> EnhancedPool<E> createEnhancedPool(IPoolManager<E> poolManager,
                                              boolean setSizeShared,
                                              boolean schedulerShared)
Type Parameters:
E - pool item type
Parameters:
poolManager - a pool manager
setSizeShared - if true setExpectiveSize will be called in a separate thread, you should prefers the schedulerShared option because on a remove call the creation will be on self thread.
schedulerShared - each time a pool item is needed a shared executor will be used
Returns:
a new pool


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