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 |
|---|---|
default void |
await()
Wait for a notification.
|
void |
await(long cMillis)
Wait for a notification.
|
void |
signal()
Notifies the waiting thread(s), waking them up if awaiting.
|
default void await()
throws InterruptedException
InterruptedException - if the calling thread is interrupted
while it is waitingvoid 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()