org.apache.axis.components.threadpool
public class ThreadPool extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
boolean |
_shutdown |
static int |
DEFAULT_MAX_THREADS |
protected static org.apache.commons.logging.Log |
log |
protected long |
threadcount |
protected java.util.Map |
threads |
Constructor and Description |
---|
ThreadPool() |
ThreadPool(int maxPoolSize) |
Modifier and Type | Method and Description |
---|---|
void |
addWorker(java.lang.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(java.lang.Runnable worker,
boolean restart)
Used by MessageWorkers to notify the pool that it is done
|
protected static org.apache.commons.logging.Log log
public static final int DEFAULT_MAX_THREADS
protected java.util.Map threads
protected long threadcount
public boolean _shutdown
public void cleanup() throws java.lang.InterruptedException
java.lang.InterruptedException
public boolean isShutdown()
public boolean isShuttingDown()
public long getWorkerCount()
public void addWorker(java.lang.Runnable worker)
public void interruptAll()
public void shutdown()
public void safeShutdown()
public void awaitShutdown() throws java.lang.InterruptedException
java.lang.InterruptedException
public boolean awaitShutdown(long timeout) throws java.lang.InterruptedException
java.lang.InterruptedException
public void workerDone(java.lang.Runnable worker, boolean restart)
Copyright ? 2005 Apache Web Services Project. All Rights Reserved.