I
- Type of the incoming payloadO
- Type of the outgoing payloadpublic interface HeartbeatListener<I,O>
HeartbeatManager
. The heartbeat listener is used
for the following things:
Modifier and Type | Method and Description |
---|---|
void |
notifyHeartbeatTimeout(ResourceID resourceID)
Callback which is called if a heartbeat for the machine identified by the given resource
ID times out.
|
void |
reportPayload(ResourceID resourceID,
I payload)
Callback which is called whenever a heartbeat with an associated payload is received.
|
CompletableFuture<O> |
retrievePayload(ResourceID resourceID)
Retrieves the payload value for the next heartbeat message.
|
void notifyHeartbeatTimeout(ResourceID resourceID)
resourceID
- Resource ID of the machine whose heartbeat has timed outvoid reportPayload(ResourceID resourceID, I payload)
resourceID
- Resource ID identifying the sender of the payloadpayload
- Payload of the received heartbeatCompletableFuture<O> retrievePayload(ResourceID resourceID)
resourceID
- Resource ID identifying the receiver of the payloadCopyright © 2014–2019 The Apache Software Foundation. All rights reserved.