org.xsocket
Class WorkerPool

Package class diagram package WorkerPool
java.lang.Object
  extended by java.util.concurrent.AbstractExecutorService
      extended by java.util.concurrent.ThreadPoolExecutor
          extended by org.xsocket.WorkerPool
All Implemented Interfaces:
Executor, ExecutorService

public final class WorkerPool
extends ThreadPoolExecutor

WorkerPool implementation

Author:
grro@xsocket.org

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.concurrent.ThreadPoolExecutor
ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy
 
Constructor Summary
WorkerPool(int maxSize)
          constructor
WorkerPool(int minSize, int maxSize)
          constructor
WorkerPool(int minSize, int maxSize, int taskqueuesize)
          constructor
WorkerPool(int minSize, int maxSize, long keepalive, TimeUnit timeunit, boolean isDaemon)
          constructor
WorkerPool(int minSize, int maxSize, long keepalive, TimeUnit timeunit, int taskqueuesize, boolean isDaemon)
          constructor
 
Method Summary
 
Methods inherited from class java.util.concurrent.ThreadPoolExecutor
afterExecute, allowCoreThreadTimeOut, allowsCoreThreadTimeOut, awaitTermination, beforeExecute, execute, finalize, getActiveCount, getCompletedTaskCount, getCorePoolSize, getKeepAliveTime, getLargestPoolSize, getMaximumPoolSize, getPoolSize, getQueue, getRejectedExecutionHandler, getTaskCount, getThreadFactory, isShutdown, isTerminated, isTerminating, prestartAllCoreThreads, prestartCoreThread, purge, remove, setCorePoolSize, setKeepAliveTime, setMaximumPoolSize, setRejectedExecutionHandler, setThreadFactory, shutdown, shutdownNow, terminated
 
Methods inherited from class java.util.concurrent.AbstractExecutorService
invokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor, submit, submit, submit
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WorkerPool

public WorkerPool(int maxSize)
constructor

Parameters:
maxSize - max worker size

WorkerPool

public WorkerPool(int minSize,
                  int maxSize)
constructor

Parameters:
minSize - min worker size
maxSize - max worker size

WorkerPool

public WorkerPool(int minSize,
                  int maxSize,
                  int taskqueuesize)
constructor

Parameters:
minSize - min worker size
maxSize - max worker size
taskqueuesize - the task queue size

WorkerPool

public WorkerPool(int minSize,
                  int maxSize,
                  long keepalive,
                  TimeUnit timeunit,
                  boolean isDaemon)
constructor

Parameters:
minSize - min worker size
maxSize - max worker size
keepalive - the keepalive
timeunit - the timeunit
isDaemon - true, if worker threads are daemon threads

WorkerPool

public WorkerPool(int minSize,
                  int maxSize,
                  long keepalive,
                  TimeUnit timeunit,
                  int taskqueuesize,
                  boolean isDaemon)
constructor

Parameters:
minSize - min worker size
maxSize - max worker size
keepalive - the keepalive
timeunit - the timeunit
taskqueuesize - the task queue size
isDaemon - true, if worker threads are daemon threads


Copyright 2010 xSocket.org