org.apache.catalina.tribes.transport
Class ThreadPool
java.lang.Object
org.apache.catalina.tribes.transport.ThreadPool
public class ThreadPool
- extends java.lang.Object
- Version:
- 1.0
- Author:
- not attributable
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ThreadPool
public ThreadPool(int maxThreads,
int minThreads,
ThreadPool.ThreadCreator creator)
throws java.lang.Exception
- Throws:
java.lang.Exception
setupThread
protected void setupThread(WorkerThread thread)
getWorker
public WorkerThread getWorker()
- Find an idle worker thread, if any. Could return null.
available
public int available()
returnWorker
public void returnWorker(WorkerThread worker)
- Called by the worker thread to return itself to the
idle pool.
getMaxThreads
public int getMaxThreads()
getMinThreads
public int getMinThreads()
stop
public void stop()
setMaxThreads
public void setMaxThreads(int maxThreads)
setMinThreads
public void setMinThreads(int minThreads)
getThreadCreator
public ThreadPool.ThreadCreator getThreadCreator()
Copyright © 2000-2006 Apache Software Foundation. All Rights Reserved.