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>
public class DefaultHeartbeatMonitor<O> extends Object implements HeartbeatMonitor<O>, Runnable
The default implementation ofHeartbeatMonitor.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcancel()Cancel this monitor.HeartbeatTarget<O>getHeartbeatTarget()Gets heartbeat target.ResourceIDgetHeartbeatTargetId()Gets heartbeat target id.longgetLastHeartbeat()Gets the last heartbeat.booleanisCanceled()voidreportHeartbeat()Report heartbeat from the monitored target.voidreportHeartbeatRpcFailure()Reports that the heartbeat rpc could not be sent to the target.voidreportHeartbeatRpcSuccess()Reports that the heartbeat rpc could be sent to the target.voidrun()
-
-
-
Method Detail
-
getHeartbeatTarget
public HeartbeatTarget<O> getHeartbeatTarget()
Description copied from interface:HeartbeatMonitorGets heartbeat target.- Specified by:
getHeartbeatTargetin interfaceHeartbeatMonitor<O>- Returns:
- the heartbeat target
-
getHeartbeatTargetId
public ResourceID 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>
-
isCanceled
public boolean isCanceled()
-
-