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
public interface HeartbeatManager<I,O> extends HeartbeatTarget<I>
A heartbeat manager has to be able to start/stop monitoring aHeartbeatTarget
, and report heartbeat timeouts for this target.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description long
getLastHeartbeatFrom(ResourceID resourceId)
Returns the last received heartbeat from the given target.void
monitorTarget(ResourceID resourceID, HeartbeatTarget<O> heartbeatTarget)
Start monitoring aHeartbeatTarget
.void
stop()
Stops the heartbeat manager.void
unmonitorTarget(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 Detail
-
monitorTarget
void monitorTarget(ResourceID resourceID, HeartbeatTarget<O> heartbeatTarget)
Start monitoring aHeartbeatTarget
. Heartbeat timeouts for this target are reported to theHeartbeatListener
associated with this heartbeat manager.- Parameters:
resourceID
- Resource ID identifying the heartbeat targetheartbeatTarget
- Interface to send heartbeat requests and responses to the heartbeat target
-
unmonitorTarget
void unmonitorTarget(ResourceID resourceID)
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
long getLastHeartbeatFrom(ResourceID resourceId)
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.
-
-