Interface HeartbeatManager<I,O>
- Type Parameters:
I- Type of the incoming payloadO- Type of the outgoing payload
- All Superinterfaces:
HeartbeatTarget<I>
- All Known Implementing Classes:
NoOpHeartbeatManager
A heartbeat manager has to be able to start/stop monitoring a
HeartbeatTarget, and report
heartbeat timeouts for this target.-
Method Summary
Modifier and TypeMethodDescriptionlonggetLastHeartbeatFrom(ResourceID resourceId) Returns the last received heartbeat from the given target.voidmonitorTarget(ResourceID resourceID, HeartbeatTarget<O> heartbeatTarget) Start monitoring aHeartbeatTarget.voidstop()Stops the heartbeat manager.voidunmonitorTarget(ResourceID resourceID) Stops monitoring the heartbeat target with the associated resource ID.Methods inherited from interface org.apache.flink.runtime.heartbeat.HeartbeatTarget
receiveHeartbeat, requestHeartbeat
-
Method Details
-
monitorTarget
Start monitoring aHeartbeatTarget. Heartbeat timeouts for this target are reported to theHeartbeatListenerassociated with this heartbeat manager.- Parameters:
resourceID- Resource ID identifying the heartbeat targetheartbeatTarget- Interface to send heartbeat requests and responses to the heartbeat target
-
unmonitorTarget
Stops monitoring the heartbeat target with the associated resource ID.- Parameters:
resourceID- Resource ID of the heartbeat target which shall no longer be monitored
-
stop
void stop()Stops the heartbeat manager. -
getLastHeartbeatFrom
Returns the last received heartbeat from the given target.- Parameters:
resourceId- for which to return the last heartbeat- Returns:
- Last heartbeat received from the given target or -1 if the target is not being monitored.
-