| java.util.concurrent.ThreadPoolExecutor org.mortbay.thread.concurrent.ThreadPool
ThreadPool | public class ThreadPool extends ThreadPoolExecutor implements org.mortbay.thread.ThreadPool,LifeCycle(Code) | | Jetty ThreadPool using java 5 ThreadPoolExecutor
This class wraps a
ThreadPoolExecutor with the
org.mortbay.thread.ThreadPool and
LifeCycle interfaces so that it may be used by the Jetty
org.mortbay.jetty.Server author: gregw |
Constructor Summary | |
public | ThreadPool() Default constructor. | public | ThreadPool(int queueSize) Default constructor. | public | ThreadPool(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit) Size constructor. | public | ThreadPool(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue) | public | ThreadPool(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, RejectedExecutionHandler handler) | public | ThreadPool(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, ThreadFactory threadFactory, RejectedExecutionHandler handler) | public | ThreadPool(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, ThreadFactory threadFactory) |
ThreadPool | public ThreadPool()(Code) | | Default constructor.
Core size is 32, max pool size is 256, pool thread timeout after 60 seconds and
an unbounded
LinkedBlockingQueue is used for the job queue;
|
ThreadPool | public ThreadPool(int queueSize)(Code) | | Default constructor.
Core size is 32, max pool size is 256, pool thread timeout after 60 seconds
Parameters: queueSize - if -1, an unbounded LinkedBlockingQueue is used, if 0 then aSynchronousQueue is used, other a ArrayBlockingQueue of the given size is used. |
ThreadPool | public ThreadPool(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit)(Code) | | Size constructor.
an unbounded
LinkedBlockingQueue is used for the jobs queue;
|
getIdleThreads | public int getIdleThreads()(Code) | | |
getThreads | public int getThreads()(Code) | | |
isFailed | public boolean isFailed()(Code) | | |
isLowOnThreads | public boolean isLowOnThreads()(Code) | | |
isRunning | public boolean isRunning()(Code) | | |
isStarted | public boolean isStarted()(Code) | | |
isStarting | public boolean isStarting()(Code) | | |
isStopped | public boolean isStopped()(Code) | | |
isStopping | public boolean isStopping()(Code) | | |
|
|