public interface Notifier
Unlike Condition no external locking or synchronization is needed with Notifiers; i.e. clients need not synchronize on this class prior to calling await() or signal(), nor should they use any of the primitive wait() or notify() methods. Note: the Notifiers are expected to be Timeout compatible.*
| Modifier and Type | Method and Description |
|---|---|
void |
await()
Wait for a notification (which may have already occurred).
|
void |
await(long cMillis)
Wait for a notification (which may have already occurred).
|
void |
signal()
Notifies the waiting thread(s), waking them up if awaiting, or preventing the next thread from going to sleep on the next await attempt.
|
void await()
throws InterruptedException
InterruptedException - if the calling thread is interrupted while it is waiting
void await(long cMillis)
throws InterruptedException
cMillis - the maximum wait time in milliseconds, or zero for indefiniteInterruptedException - if the calling thread is interrupted while it is waitingvoid signal()