|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface WaitNotifyService
A service for an object where one can wait on, like ICondition or ILock when a thread needs to wait for a lock to be released.
| Method Summary | |
|---|---|
void |
await(WaitSupport waitSupport)
Causes the current operation to wait in WaitNotifyService until it is notified by a Notifier operation or timeout specified by
WaitSupport.getWaitTimeout() passes. |
void |
notify(Notifier notifier)
Notifies the waiting WaitSupport operation to wake-up and continue executing. |
| Method Detail |
|---|
void await(WaitSupport waitSupport)
Notifier operation or timeout specified by
WaitSupport.getWaitTimeout() passes.
WaitSupport operation will be registered using WaitNotifyKey
returned from method WaitSupport.getWaitKey().
When operation is notified, it's re-executed by related scheduled mechanism.
If wait time-outs, WaitSupport.onWaitExpire() method is called.
This method should be called in the thread executes the actual WaitSupport operation.
waitSupport - operation which will wait for notificationvoid notify(Notifier notifier)
WaitSupport operation to wake-up and continue executing.
A waiting operation registered with the Notifier.getNotifiedKey() will be notified and deregistered.
This method has no effect if there isn't any operation registered
for related WaitNotifyKey.
This method should be called in the thread executes the actual Notifier operation.
notifier - operation which will notify a corresponding waiting operation
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||