Interface HeartbeatMonitor<O>

Type Parameters:
O - Type of the payload being sent to the associated heartbeat target
All Known Implementing Classes:
DefaultHeartbeatMonitor

public interface HeartbeatMonitor<O>
Heartbeat monitor which manages the heartbeat state of the associated heartbeat target. The monitor notifies the HeartbeatListener whenever it has not seen a heartbeat signal in the specified heartbeat timeout interval. Each heartbeat signal resets this timer.
  • Method Details

    • getHeartbeatTarget

      HeartbeatTarget<O> getHeartbeatTarget()
      Gets heartbeat target.
      Returns:
      the heartbeat target
    • getHeartbeatTargetId

      ResourceID getHeartbeatTargetId()
      Gets heartbeat target id.
      Returns:
      the heartbeat target id
    • reportHeartbeat

      void reportHeartbeat()
      Report heartbeat from the monitored target.
    • cancel

      void cancel()
      Cancel this monitor.
    • getLastHeartbeat

      long getLastHeartbeat()
      Gets the last heartbeat.
      Returns:
      the last heartbeat
    • reportHeartbeatRpcFailure

      void reportHeartbeatRpcFailure()
      Reports that the heartbeat rpc could not be sent to the target.
    • reportHeartbeatRpcSuccess

      void reportHeartbeatRpcSuccess()
      Reports that the heartbeat rpc could be sent to the target.