|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ourgrid.test.threadServices.ShutdownableRunnable
public class ShutdownableRunnable
This class is used to perform tests on the threadServices package using several threads.
Field Summary | |
---|---|
static boolean |
DEBUG
A debug variable. |
protected boolean |
mustShutdown
Signals when the scheduler must shutdown |
Constructor Summary | |
---|---|
ShutdownableRunnable()
Constructor of this runnable, creating its Thread object. |
|
ShutdownableRunnable(boolean withInner)
Constructor with a boolean indicating if in this Runnable we should create other Threads. |
Method Summary | |
---|---|
ShutdownableThread |
getMyThread()
Gets the thread related with this Runnable. |
boolean |
isThereAnythingToDo()
Gets the flag value that indicates if there is something to do. |
void |
println(java.lang.String str)
General method that prints the string parameter on the standard output. |
void |
run()
Prints some messages and creates InnerRunnable objects depending on the situation. |
void |
setIsThereAnythingToDo(boolean isThere)
Sets the flag that indicates if there is something to do. |
void |
shutdown()
Marks the scheduler thread to be shutdown. |
void |
startShutdownable()
Starts the thread related with this Runnable. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final boolean DEBUG
protected boolean mustShutdown
Constructor Detail |
---|
public ShutdownableRunnable()
public ShutdownableRunnable(boolean withInner)
withInner
- Indicates if in this Runnable run method other threads
should be created.Method Detail |
---|
public void startShutdownable()
public void shutdown()
shutdown
in interface Shutdownable
public void run()
run
in interface java.lang.Runnable
Runnable.run()
public boolean isThereAnythingToDo()
public void setIsThereAnythingToDo(boolean isThere)
isThere
- The nothingToDo to set.public ShutdownableThread getMyThread()
public void println(java.lang.String str)
str
- String to be printed.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |