|
Luky Library - 4.1.1 (20061117-1148) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectluky.util.BinarySemaphore
public class BinarySemaphore
The BinarySempaphore Class is a class that holds all logic that's required for synchronizing access and execution of threads

| Constructor Summary | |
|---|---|
BinarySemaphore()
constructor for a blocking semaphore (no timeout) |
|
BinarySemaphore(long timeout)
timed constructor |
|
BinarySemaphore(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 BinarySemaphore()
public BinarySemaphore(long timeout)
timeout - long value specifying the timeout value in milli secondspublic BinarySemaphore(String timeout)
timeout - string value specifying the timeout value in milli seconds| Method 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 | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||