|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--snap.graph.Monitor
The Read Write Monitor Class
Constructor Summary | |
Monitor()
|
Method Summary | |
void |
acquireRead()
While some writer is writing reader waits else number of readers is incremented |
void |
acquireWrite()
While some writer is writing or some reader is reading writer waits else writer starts writing |
void |
releaseRead()
Number of readers is deccremented . |
void |
releaseWrite()
Writer finishes writing and notify all the waiting threads |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Monitor()
Method Detail |
public void acquireRead() throws java.lang.InterruptedException
java.lang.InterruptedException
public void releaseRead()
public void acquireWrite() throws java.lang.InterruptedException
java.lang.InterruptedException
public void releaseWrite()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |