|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Condition
A condition component aima at synchronizing the execution of several
components. Condition components use Mutex
components.
Note: Inspired by Doug Lea's implementation.
Mutex
Field Summary | |
---|---|
static String |
ITF_NAME
The commonly used name to refer to this interface. |
Method Summary | |
---|---|
void |
await()
Wait for notification. |
void |
signal()
Notify a waiting thread. |
void |
signalAll()
Notify all waiting threads * |
boolean |
timedwait(long msecs)
Wait for at most msecs for notification. |
Field Detail |
---|
static final String ITF_NAME
Method Detail |
---|
void await() throws InterruptedException
InterruptedException
- if the thread was interrupted before or
during the wait. However, if the thread is interrupted after
the wait but during mutex re-acquisition, the interruption is
ignored, while still ensuring that the currentThread's
interruption state stays true, so can be probed by callers.boolean timedwait(long msecs) throws InterruptedException
msecs
- The time to wait. A value less than or equal to zero causes a
momentarily release and re-acquire of the mutex, and always
returns false.
InterruptedException
- if the thread was interrupted before or
during the wait.void signal()
void signalAll()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |