|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjutil.ThreadManager
public class ThreadManager
The thread manager is an extensible class that safely manages a pool of worker threads.
Field Summary | |
---|---|
private java.util.List |
workers
The pool of worker threads to be managed. |
Constructor Summary | |
---|---|
ThreadManager()
|
Method Summary | |
---|---|
void |
add(WorkerThread worker)
Add a worker thread to the pool. |
void |
clear()
clear workers list. |
void |
haltAll()
Safely halts all workers |
void |
joinAll()
Joins all workers. |
void |
joinAll(long msecs)
Join all workers until the stop or a timeout occurs. |
void |
pauseAll()
Safely pauses all workers. |
void |
startAll()
Start all workers. |
java.lang.String |
toString()
|
void |
unpauseAll()
Safely unpauses all the workers. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private java.util.List workers
Constructor Detail |
---|
public ThreadManager()
Method Detail |
---|
public void clear()
public void add(WorkerThread worker)
worker
- the worker to be added to the list.public void pauseAll()
public void unpauseAll()
public void haltAll()
public void startAll()
public java.lang.String toString()
toString
in class java.lang.Object
public void joinAll()
public void joinAll(long msecs)
msecs
- number of milliseconds until a timeout
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |