|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface AsyncState
A mutable boolean that can be waited on for asynchronous value changes.
| Method Summary | |
|---|---|
void |
await(boolean value)
Blocks the calling thread until the state of the boolean equals the given value. |
void |
await(boolean value,
long timeout,
TimeUnit unit)
Blocks the calling thread until the state of the boolean equals the given value. |
boolean |
value()
|
| Method Detail |
|---|
boolean value()
void await(boolean value)
throws InterruptedException
value - The value the boolean should have for the wait to end.
InterruptedException - When the thread is interrupted.
void await(boolean value,
long timeout,
TimeUnit unit)
throws InterruptedException,
TimeoutException
By the time the thread returns, the mutable boolean may have already changed again but it is guaranteed that the boolean was at least once equal the given value during the wait.
value - The value of the state to wait for.timeout - The maximum time to wait.unit - The time unit for the timeout.
InterruptedException - When the thread is interrupted.
TimeoutException - When the timeout elapses.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||