|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectTSim.Semaphore
public class Semaphore
Semaphore shared with other trains on the same track.
Method Summary | |
---|---|
void |
acquire()
Acquire semaphore (P operation). |
void |
release()
Release semaphore (V operation). |
boolean |
tryAcquire()
Acquire semaphore if free. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public void acquire()
public void release()
public boolean tryAcquire()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |