|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbiz.onixs.fix.engine.util.Semaphore
public class Semaphore
Implementation of Dijkstra's counting semaphore in java.
Constructor Summary | |
---|---|
Semaphore(int count)
Create a Semaphore. |
Method Summary | |
---|---|
void |
acquire()
Acquire the Semaphore. |
void |
acquire(long timeOut)
Acquire the Semaphore. |
void |
release()
Release the Semaphore. |
boolean |
tryAcquire(long timeOut)
Acquire the Semaphore. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Semaphore(int count)
count
- semaphore countMethod Detail |
---|
public void acquire() throws InterruptedException
InterruptedException
- exception during waitpublic void acquire(long timeOut) throws TimeoutException, InterruptedException
timeOut
- amount of time (millisec) to wait before returning
(unless operation completes before)
TimeoutException
- wait timed out exception
InterruptedException
- exception during waitpublic boolean tryAcquire(long timeOut) throws InterruptedException
timeOut
- amount of time (millisec) to wait before returning
(unless operation completes before)
InterruptedException
- exception during waitpublic void release()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |