|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jlog2.util.Monitor
public class Monitor
To synchronize threads on.
Field Summary | |
---|---|
protected static java.lang.Object |
syncOn
An object to synchronize on |
protected static Monitor |
theMonitor
The variable to synchronize on |
Method Summary | |
---|---|
static Monitor |
getMonitor()
Return the monitor instance. |
java.lang.Object |
getSyncOn()
Get an object to synchronize on. |
void |
lock()
Lock current thread on this monitor. |
void |
release()
Release locked threads. |
static void |
restartThread(java.lang.Thread theThread,
boolean startNew)
Re-start the thread running depending on its current state. |
static void |
stopThread(java.lang.Thread theThread)
Re-start the thread running depending on its current state. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final java.lang.Object syncOn
protected static final Monitor theMonitor
Method Detail |
---|
public static Monitor getMonitor()
public java.lang.Object getSyncOn()
public void lock()
public void release()
public static void stopThread(java.lang.Thread theThread)
theThread
- the thread to stop.public static void restartThread(java.lang.Thread theThread, boolean startNew)
theThread
- the thread to start.startNew
- true if start a new thread for the first time.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |