I
- Type of the incoming payloadO
- Type of the outgoing payloadpublic interface HeartbeatManager<I,O> extends HeartbeatTarget<I>
HeartbeatTarget
, and report heartbeat timeouts
for this target.Modifier and Type | Method and Description |
---|---|
long |
getLastHeartbeatFrom(ResourceID resourceId)
Returns the last received heartbeat from the given target.
|
void |
monitorTarget(ResourceID resourceID,
HeartbeatTarget<O> heartbeatTarget)
Start monitoring a
HeartbeatTarget . |
void |
stop()
Stops the heartbeat manager.
|
void |
unmonitorTarget(ResourceID resourceID)
Stops monitoring the heartbeat target with the associated resource ID.
|
receiveHeartbeat, requestHeartbeat
void monitorTarget(ResourceID resourceID, HeartbeatTarget<O> heartbeatTarget)
HeartbeatTarget
. Heartbeat timeouts for this target are reported
to the HeartbeatListener
associated with this heartbeat manager.resourceID
- Resource ID identifying the heartbeat targetheartbeatTarget
- Interface to send heartbeat requests and responses to the heartbeat
targetvoid unmonitorTarget(ResourceID resourceID)
resourceID
- Resource ID of the heartbeat target which shall no longer be monitoredvoid stop()
long getLastHeartbeatFrom(ResourceID resourceId)
resourceId
- for which to return the last heartbeatCopyright © 2014–2020 The Apache Software Foundation. All rights reserved.