Class DefaultHeartbeatMonitor<O>
java.lang.Object
org.apache.flink.runtime.heartbeat.DefaultHeartbeatMonitor<O>
- Type Parameters:
O- Type of the payload being sent to the associated heartbeat target
- All Implemented Interfaces:
Runnable,HeartbeatMonitor<O>
The default implementation of
HeartbeatMonitor.-
Method Summary
Modifier and TypeMethodDescriptionvoidcancel()Cancel this monitor.Gets heartbeat target.Gets heartbeat target id.longGets the last heartbeat.booleanvoidReport heartbeat from the monitored target.voidReports that the heartbeat rpc could not be sent to the target.voidReports that the heartbeat rpc could be sent to the target.voidrun()
-
Method Details
-
getHeartbeatTarget
Description copied from interface:HeartbeatMonitorGets heartbeat target.- Specified by:
getHeartbeatTargetin interfaceHeartbeatMonitor<O>- Returns:
- the heartbeat target
-
getHeartbeatTargetId
Description copied from interface:HeartbeatMonitorGets heartbeat target id.- Specified by:
getHeartbeatTargetIdin interfaceHeartbeatMonitor<O>- Returns:
- the heartbeat target id
-
getLastHeartbeat
public long getLastHeartbeat()Description copied from interface:HeartbeatMonitorGets the last heartbeat.- Specified by:
getLastHeartbeatin interfaceHeartbeatMonitor<O>- Returns:
- the last heartbeat
-
reportHeartbeatRpcFailure
public void reportHeartbeatRpcFailure()Description copied from interface:HeartbeatMonitorReports that the heartbeat rpc could not be sent to the target.- Specified by:
reportHeartbeatRpcFailurein interfaceHeartbeatMonitor<O>
-
reportHeartbeatRpcSuccess
public void reportHeartbeatRpcSuccess()Description copied from interface:HeartbeatMonitorReports that the heartbeat rpc could be sent to the target.- Specified by:
reportHeartbeatRpcSuccessin interfaceHeartbeatMonitor<O>
-
reportHeartbeat
public void reportHeartbeat()Description copied from interface:HeartbeatMonitorReport heartbeat from the monitored target.- Specified by:
reportHeartbeatin interfaceHeartbeatMonitor<O>
-
cancel
public void cancel()Description copied from interface:HeartbeatMonitorCancel this monitor.- Specified by:
cancelin interfaceHeartbeatMonitor<O>
-
run
public void run() -
isCanceled
public boolean isCanceled()
-