|
Luky Library - 4.1.1 (20061117-1148) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectluky.util.Semaphore
public class Semaphore
The Sempaphore Class is a class that holds all logic that's required for synchronizing access and execution of threads with counting sems
Constructor Summary | |
---|---|
Semaphore()
constructor for a blocking semaphore (no timeout) |
|
Semaphore(long timeout)
timed constructor |
|
Semaphore(String timeout)
timed constructor |
Method Summary | |
---|---|
int |
getSem()
takes the current semaphore, in case the semaphore is not available the method will 'hang' until a semaphore is set or a timeout occurs |
long |
getTimeoutValue()
returns the timeout value for this semaphore |
int |
setSem()
sets the current semaphore, in case a different thread was 'hanging' on this thread will be released |
int |
setTimeoutValue(long timeout)
sets the timeout value for this semaphore, blocked threads will not be affected |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Semaphore()
public Semaphore(long timeout)
timeout
- long value specifying the timeout value in milli secondspublic Semaphore(String timeout)
timeout
- string value specifying the timeout value in milli secondsMethod Detail |
---|
public int setTimeoutValue(long timeout)
timeout
- long value specifying the timeout value in milli seconds
public long getTimeoutValue()
public int getSem()
public int setSem()
|
Luky Library - 4.1.1 (20061117-1148) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |