Class NoOpHeartbeatManager<I,O>
java.lang.Object
org.apache.flink.runtime.heartbeat.NoOpHeartbeatManager<I,O>
- Type Parameters:
I- ignoredO- ignored
- All Implemented Interfaces:
HeartbeatManager<I,,O> HeartbeatTarget<I>
HeartbeatManager implementation which does nothing.-
Method Summary
Modifier and TypeMethodDescriptionstatic <A,B> NoOpHeartbeatManager<A, B> longgetLastHeartbeatFrom(ResourceID resourceId) Returns the last received heartbeat from the given target.voidmonitorTarget(ResourceID resourceID, HeartbeatTarget<O> heartbeatTarget) Start monitoring aHeartbeatTarget.receiveHeartbeat(ResourceID heartbeatOrigin, I heartbeatPayload) Sends a heartbeat response to the target.requestHeartbeat(ResourceID requestOrigin, I heartbeatPayload) Requests a heartbeat from the target.voidstop()Stops the heartbeat manager.voidunmonitorTarget(ResourceID resourceID) Stops monitoring the heartbeat target with the associated resource ID.
-
Method Details
-
monitorTarget
Description copied from interface:HeartbeatManagerStart monitoring aHeartbeatTarget. Heartbeat timeouts for this target are reported to theHeartbeatListenerassociated with this heartbeat manager.- Specified by:
monitorTargetin interfaceHeartbeatManager<I,O> - Parameters:
resourceID- Resource ID identifying the heartbeat targetheartbeatTarget- Interface to send heartbeat requests and responses to the heartbeat target
-
unmonitorTarget
Description copied from interface:HeartbeatManagerStops monitoring the heartbeat target with the associated resource ID.- Specified by:
unmonitorTargetin interfaceHeartbeatManager<I,O> - Parameters:
resourceID- Resource ID of the heartbeat target which shall no longer be monitored
-
stop
public void stop()Description copied from interface:HeartbeatManagerStops the heartbeat manager.- Specified by:
stopin interfaceHeartbeatManager<I,O>
-
getLastHeartbeatFrom
Description copied from interface:HeartbeatManagerReturns the last received heartbeat from the given target.- Specified by:
getLastHeartbeatFromin interfaceHeartbeatManager<I,O> - 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.
-
receiveHeartbeat
Description copied from interface:HeartbeatTargetSends a heartbeat response to the target. Each heartbeat response can carry a payload which contains additional information for the heartbeat target.- Specified by:
receiveHeartbeatin interfaceHeartbeatTarget<I>- Parameters:
heartbeatOrigin- Resource ID identifying the machine for which a heartbeat shall be reported.heartbeatPayload- Payload of the heartbeat. Null indicates an empty payload.- Returns:
- Future that is completed exceptionally if the heartbeat response could not be sent to the target
-
requestHeartbeat
Description copied from interface:HeartbeatTargetRequests a heartbeat from the target. Each heartbeat request can carry a payload which contains additional information for the heartbeat target.- Specified by:
requestHeartbeatin interfaceHeartbeatTarget<I>- Parameters:
requestOrigin- Resource ID identifying the machine issuing the heartbeat request.heartbeatPayload- Payload of the heartbeat request. Null indicates an empty payload.- Returns:
- Future that is completed exceptionally if the heartbeat request could not be sent to the target
-
getInstance
-