public interface WaitNotifyService
| Modifier and Type | Field and Description |
|---|---|
static String |
SERVICE_NAME |
| Modifier and Type | Method and Description |
|---|---|
void |
await(BlockingOperation blockingOperation)
Causes the current operation to wait in WaitNotifyService until it is notified
by a
Notifier operation or timeout specified by
BlockingOperation.getWaitTimeout() passes. |
void |
cancelWaitingOps(String serviceName,
Object objectId,
Throwable cause) |
void |
notify(Notifier notifier)
Notifies the waiting
BlockingOperation operation to wake-up and continue executing. |
static final String SERVICE_NAME
void await(BlockingOperation blockingOperation)
Notifier operation or timeout specified by
BlockingOperation.getWaitTimeout() passes.
BlockingOperation operation will be registered using WaitNotifyKey
returned from method BlockingOperation.getWaitKey().
When operation is notified, it's re-executed by related scheduled mechanism.
If wait time-outs, BlockingOperation.onWaitExpire() method is called.
This method should be called in the thread executes the actual BlockingOperation operation.blockingOperation - operation which will wait for notificationvoid notify(Notifier notifier)
BlockingOperation 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 operationCopyright © 2017 Hazelcast, Inc.. All Rights Reserved.