org.apache.axis.components.threadpool
public class ThreadPool extends Object
Field Summary | |
---|---|
static int | DEFAULT_MAX_THREADS |
protected static Log | log |
protected long | threadcount |
protected Map | threads |
boolean | _shutdown |
Constructor Summary | |
---|---|
ThreadPool() | |
ThreadPool(int maxPoolSize) |
Method Summary | |
---|---|
void | addWorker(Runnable worker)
Adds a new worker to the pool |
void | awaitShutdown()
Await shutdown of the worker |
boolean | awaitShutdown(long timeout)
Await shutdown of the worker |
void | cleanup() |
long | getWorkerCount()
Returns the total number of currently active workers |
void | interruptAll()
Forcefully interrupt all workers |
boolean | isShutdown()
Returns true if all workers have been shutdown |
boolean | isShuttingDown()
Returns true if all workers are in the process of shutting down |
void | safeShutdown()
Forcefully shutdown the pool |
void | shutdown()
Forcefully shutdown the pool |
void | workerDone(Runnable worker, boolean restart)
Used by MessageWorkers to notify the pool that it is done |