Contents | Package | Class | Tree | Deprecated | Index | Help | |||
PREV | NEXT | SHOW LISTS | HIDE LISTS |
java.lang.Object | +----jsync.Semaphore
wait()
and
signal()
operations.
Constructor Summary | |
Semaphore()
|
|
Semaphore(int initValue)
|
Method Summary | |
void | signal()
|
void | waitSemaphore()
|
boolean | waitSemaphore(long timeout)
timeout miliseconds for non-zero value
of counter.
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Semaphore()
public Semaphore(int initValue)
initValue
- initial value of semaphore counter
Method Detail |
public void waitSemaphore()
public boolean waitSemaphore(long timeout)
timeout
miliseconds for non-zero value
of counter.
timeout
- the maximum time to wait in milliseconds.
true
if counter is not zero, false
if wait()
was terminated due to timeout expiration.public void signal()
Contents | Package | Class | Tree | Deprecated | Index | Help | |||
PREV | NEXT | SHOW LISTS | HIDE LISTS |