com.metamatrix.common.queue
Class WorkerPoolFactory

java.lang.Object
  extended by com.metamatrix.common.queue.WorkerPoolFactory

public class WorkerPoolFactory
extends java.lang.Object

Creates WorkPools based upon ThreadPoolExecutor


Nested Class Summary
static class WorkerPoolFactory.DefaultThreadFactory
           
 
Constructor Summary
WorkerPoolFactory()
           
 
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
 

Constructor Detail

WorkerPoolFactory

public WorkerPoolFactory()
Method Detail

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 allowed
keepAlive - 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.