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

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

public final class ReusableThreadPoolFactory
extends java.lang.Object

Author:
Gael Lalire

Method Summary
static IPool<IReusableThread> createExecutorThreadPool(java.util.concurrent.Executor executor, int limit)
          Use the executor to create, fetch and record items of pool (Executor).
static IPool<IReusableThread> createManagementThreadPool(int poolSize)
          Use a management thread to create new pool item (Executor).
static IPool<IReusableThread> createWorkManagerThreadPool(javax.resource.spi.work.WorkManager workManager, int limit)
          Use the work manager to create, fetch and record items of pool (Executor).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createManagementThreadPool

public static IPool<IReusableThread> createManagementThreadPool(int poolSize)
Use a management thread to create new pool item (Executor). Use a management thread also to call setExpectedSize (ISharedManager).

Parameters:
poolSize - the number of management thread

createWorkManagerThreadPool

public static IPool<IReusableThread> createWorkManagerThreadPool(javax.resource.spi.work.WorkManager workManager,
                                                                 int limit)
Use the work manager to create, fetch and record items of pool (Executor). Use the work manager also to call setExpectedSize (ISharedManager).

Parameters:
workManager - the workManager
limit - max call to doSchedule of pool management

createExecutorThreadPool

public static IPool<IReusableThread> createExecutorThreadPool(java.util.concurrent.Executor executor,
                                                              int limit)
Use the executor to create, fetch and record items of pool (Executor). Use the executor also to call setExpectedSize (ISharedManager).

Parameters:
executor - the executor
limit - max call to execute of pool management


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