|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.tomcat.util.threads.ThreadPool
A thread pool that is trying to copy the apache process management.
Field Summary | |
protected int |
currentThreadCount
|
protected int |
currentThreadsBusy
|
static int |
MAX_SPARE_THREADS
|
static int |
MAX_THREADS
|
protected int |
maxSpareThreads
|
protected int |
maxThreads
|
static int |
MIN_SPARE_THREADS
|
protected int |
minSpareThreads
|
protected org.apache.tomcat.util.threads.ThreadPool.MonitorRunnable |
monitor
|
protected java.util.Vector |
pool
|
protected boolean |
stopThePool
|
static int |
WORK_WAIT_TIMEOUT
|
Constructor Summary | |
ThreadPool()
|
Method Summary | |
protected void |
adjustLimits()
|
protected void |
checkSpareControllers()
Called by the monitor thread to harvest idle threads. |
int |
getMaxSpareThreads()
|
int |
getMaxThreads()
|
int |
getMinSpareThreads()
|
static void |
logFull(Log loghelper,
int currentThreadCount,
int maxThreads)
|
protected void |
notifyThreadEnd(org.apache.tomcat.util.threads.ThreadPool.ControlRunnable c)
Inform the pool that the specific thread finish. |
protected void |
openThreads(int toOpen)
|
protected void |
returnController(org.apache.tomcat.util.threads.ThreadPool.ControlRunnable c)
Returns the thread to the pool. |
void |
runIt(ThreadPoolRunnable r)
Executes a given Runnable on a thread in the pool, block if needed. |
void |
setMaxSpareThreads(int maxSpareThreads)
|
void |
setMaxThreads(int maxThreads)
|
void |
setMinSpareThreads(int minSpareThreads)
|
void |
shutdown()
Stop the thread pool |
void |
start()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int MAX_THREADS
public static final int MAX_SPARE_THREADS
public static final int MIN_SPARE_THREADS
public static final int WORK_WAIT_TIMEOUT
protected java.util.Vector pool
protected org.apache.tomcat.util.threads.ThreadPool.MonitorRunnable monitor
protected int maxThreads
protected int minSpareThreads
protected int maxSpareThreads
protected int currentThreadCount
protected int currentThreadsBusy
protected boolean stopThePool
Constructor Detail |
public ThreadPool()
Method Detail |
public void start()
public void setMaxThreads(int maxThreads)
public int getMaxThreads()
public void setMinSpareThreads(int minSpareThreads)
public int getMinSpareThreads()
public void setMaxSpareThreads(int maxSpareThreads)
public int getMaxSpareThreads()
public void runIt(ThreadPoolRunnable r)
public static void logFull(Log loghelper, int currentThreadCount, int maxThreads)
public void shutdown()
protected void checkSpareControllers()
protected void returnController(org.apache.tomcat.util.threads.ThreadPool.ControlRunnable c)
protected void notifyThreadEnd(org.apache.tomcat.util.threads.ThreadPool.ControlRunnable c)
protected void adjustLimits()
protected void openThreads(int toOpen)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |