|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectautohit.common.ProcessMonitor
Process monitors. There are three seperate monitors:
1- Locks: spinlocks on a shared lock monitor. Includes the redlight,
greenlight function.
2- Signals: A cummulative signal, much like a semaphore.
3- Rendezous: Between two threads.
Each of the three monitors do not effect each other.
EPG - Rewrite - 16May03
Constructor Summary | |
ProcessMonitor()
Default constructor. |
Method Summary | |
boolean |
free()
Cancel all locks. |
void |
green()
Turn on the green light. |
boolean |
lock()
Lock monitor. |
void |
red()
Turn on the green light. |
void |
rendezous()
Rendevous between two threads-- not signal. |
void |
signal()
Send a signal. |
void |
stoplight()
Wait for the green light. |
boolean |
unlock()
Knock the spinlock down one. |
void |
waitlock()
Wait for a lock. |
void |
waitSignal()
Wait for a signal. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ProcessMonitor()
Method Detail |
public boolean lock()
public boolean unlock()
public boolean free()
public void waitlock()
public void stoplight()
public void green()
public void red()
public void waitSignal() throws java.lang.InterruptedException
java.lang.InterruptedException
public void signal()
public void rendezous()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |