com.metamatrix.common.queue
Class WorkerPoolFactory
java.lang.Object
com.metamatrix.common.queue.WorkerPoolFactory
public class WorkerPoolFactory
- extends java.lang.Object
Creates WorkPools based upon ThreadPoolExecutor
Method Summary |
static WorkerPool |
newWorkerPool(java.lang.String name,
int numThreads,
long keepAlive)
Creates a WorkerPool that prefers thread reuse over thread creation based upon the given parameters |
static WorkerPool |
newWorkerPool(java.lang.String name,
int numThreads,
long keepAlive,
boolean preferExistingThreads)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WorkerPoolFactory
public WorkerPoolFactory()
newWorkerPool
public static WorkerPool newWorkerPool(java.lang.String name,
int numThreads,
long keepAlive)
- Creates a WorkerPool that prefers thread reuse over thread creation based upon the given parameters
- Parameters:
name
- numThreads
- the maximum number of worker threads allowedkeepAlive
- keepAlive time in milliseconds - NOT supported until JDK 1.6 for pools that don't prefer existing threads
- Returns:
newWorkerPool
public static WorkerPool newWorkerPool(java.lang.String name,
int numThreads,
long keepAlive,
boolean preferExistingThreads)
Copyright © 2009. All Rights Reserved.