public class RJ
extends java.lang.Object
RJ class contains several useful methods.| Constructor and Description |
|---|
RJ() |
| Modifier and Type | Method and Description |
|---|---|
static void |
exit(int status)
Terminates the currently running RJ program.
|
static void |
nap(long millis)
Invokes
nap(long,int) on nap(millis,0). |
static void |
nap(long millis,
int nanos)
Causes the currently executing thread to sleep (cease execution)
for the specified number of milliseconds
plus the specified number of nanoseconds.
|
static void |
registerQuiescenceAction(OpProxy cap)
Registers the quiescence action.
|
static void |
yield()
Causes the currently executing thread
to temporarily pause and allow other threads to execute.
|
public static void exit(int status)
status - The exit status.public static void nap(long millis)
nap(long,int) on nap(millis,0).millis - the length of time to sleep in milliseconds.public static void nap(long millis,
int nanos)
nap is just like Java's Thread.sleep
except that nap catches any InterruptedException.
Reminder: Java's Thread.sleep
throws IllegalArgumentException for negative millis
or nanos out of range 0-999999.millis - the length of time to sleep in milliseconds.nanos - 0-999999 additional nanoseconds to sleep.public static void yield()
public static void registerQuiescenceAction(OpProxy cap) throws QuiescenceRegistrationException
send when the RJ program quiesces.cap - The quiescence operation.QuiescenceRegistrationException - any problems.