|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dist1.acb.common.Signal
Signal (for synchronization of threads)
Constructor Summary | |
Signal(java.lang.String signalName)
Creates a new instance of Signal (not signaled state) |
|
Signal(java.lang.String signalName,
boolean isSignaled)
Creates a new instance of Signal |
Method Summary | |
void |
signal()
Signal to one of waiters |
void |
signalToAll()
Signal to all waiters |
void |
waitForSignal()
Waits for signal |
boolean |
waitForSignal(long timeout)
Waits for signal (maximum timeout ms) |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Signal(java.lang.String signalName)
signalName
- A name of the signalpublic Signal(java.lang.String signalName, boolean isSignaled)
signalName
- A name of the signalisSignaled
- if start state is signaled stateMethod Detail |
public void signal()
public void signalToAll()
public void waitForSignal() throws java.lang.InterruptedException
java.lang.InterruptedException
- Snother thread interrupted current thread
using the interrupt method in class Threadpublic boolean waitForSignal(long timeout) throws java.lang.InterruptedException
timeout
- the maximum time to wait in milliseconds
java.lang.InterruptedException
- Snother thread interrupted current thread
using the interrupt method in class Thread
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |