A thread pool that is trying to copy the apache process management.
Should we remove this in favor of Doug Lea's thread package?
author: Gal Shachor author: Yoav Shapira
Inner Class :public static class MonitorRunnable implements Runnable
Inner Class :public static class ControlRunnable implements Runnable
Inner Class :public static interface ThreadPoolListener
Create a ThreadPool instance.
Parameters: jmx - UNUSED ThreadPool instance. If JMX support is requested, you need tocall register() in order to set a name.
Return an array with the status of each thread. The status
indicates the current request processing stage ( for tomcat ) or
whatever the thread is doing ( if the application using TP provide
this info )
The default is true - the created threads will be
in daemon mode. If set to false, the control thread
will not be daemon - and will keep the process alive.
setMaxSpareThreads
public void setMaxSpareThreads(int maxSpareThreads)(Code)
public synchronized void setThreadPriority(int threadPriority)(Code)
Sets the thread priority for current
and future threads in this pool.
Parameters: threadPriority - The new priority throws: IllegalArgumentException - If the specifiedpriority is less than Thread.MIN_PRIORITY ormore than Thread.MAX_PRIORITY