|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpops.ale.engine.input.connectors.Semaphore
public class Semaphore
Binary semaphore class.
Constructor Summary | |
---|---|
Semaphore()
|
Method Summary | |
---|---|
boolean |
getFlag()
|
void |
lock(boolean condition)
Blocks until the signal method is called. |
void |
setFlag(boolean value)
|
void |
signal(boolean condition)
Sets the semaphore flag, and notifies waiting threads. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Semaphore()
Method Detail |
---|
public void setFlag(boolean value)
public boolean getFlag()
public void lock(boolean condition) throws java.lang.InterruptedException
condition
- boolean value.
java.lang.InterruptedException
public void signal(boolean condition)
condition
- boolean value.
java.lang.InterruptedException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |