|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.notuvy.thread.ThreadControl
public class ThreadControl
Flags which control the operation of a worker thread. There is no actual functionality here. Rather, the implementation of the worker thread should properly use these flags to control its operation.
Field Summary | |
---|---|
protected static org.apache.log4j.Logger |
LOG
|
Constructor Summary | |
---|---|
ThreadControl()
|
Method Summary | |
---|---|
boolean |
isAlive()
|
boolean |
isEnabled()
|
boolean |
isRunning()
Is the thread engaged in actual work currently. |
void |
resume()
Enable the worker to process any queued work. |
protected void |
setRunning(boolean pRunning)
Called by the worker thread framework when actual work is started or finished. |
void |
stop()
Terminate (permanently) the worker. |
void |
suspend()
Temporarily disable the worker. |
String |
toString()
|
void |
waitForQuiescence()
If the worker has been stopped, wait for all outstanding work to finish. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static final org.apache.log4j.Logger LOG
Constructor Detail |
---|
public ThreadControl()
Method Detail |
---|
public boolean isAlive()
public boolean isEnabled()
public boolean isRunning()
protected void setRunning(boolean pRunning)
pRunning
- Indication whether actual work is currently being performed.public String toString()
toString
in class Object
public void stop()
public void suspend()
public void resume()
public void waitForQuiescence()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |