O
- Type of the payload being sent to the associated heartbeat targetpublic class DefaultHeartbeatMonitor<O> extends Object implements HeartbeatMonitor<O>, Runnable
HeartbeatMonitor
.Modifier and Type | Method and Description |
---|---|
void |
cancel()
Cancel this monitor.
|
HeartbeatTarget<O> |
getHeartbeatTarget()
Gets heartbeat target.
|
ResourceID |
getHeartbeatTargetId()
Gets heartbeat target id.
|
long |
getLastHeartbeat()
Gets the last heartbeat.
|
boolean |
isCanceled() |
void |
reportHeartbeat()
Report heartbeat from the monitored target.
|
void |
reportHeartbeatRpcFailure()
Reports that the heartbeat rpc could not be sent to the target.
|
void |
reportHeartbeatRpcSuccess()
Reports that the heartbeat rpc could be sent to the target.
|
void |
run() |
public HeartbeatTarget<O> getHeartbeatTarget()
HeartbeatMonitor
getHeartbeatTarget
in interface HeartbeatMonitor<O>
public ResourceID getHeartbeatTargetId()
HeartbeatMonitor
getHeartbeatTargetId
in interface HeartbeatMonitor<O>
public long getLastHeartbeat()
HeartbeatMonitor
getLastHeartbeat
in interface HeartbeatMonitor<O>
public void reportHeartbeatRpcFailure()
HeartbeatMonitor
reportHeartbeatRpcFailure
in interface HeartbeatMonitor<O>
public void reportHeartbeatRpcSuccess()
HeartbeatMonitor
reportHeartbeatRpcSuccess
in interface HeartbeatMonitor<O>
public void reportHeartbeat()
HeartbeatMonitor
reportHeartbeat
in interface HeartbeatMonitor<O>
public void cancel()
HeartbeatMonitor
cancel
in interface HeartbeatMonitor<O>
public boolean isCanceled()
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.