Class NoOpHeartbeatManager<I,O>

java.lang.Object
org.apache.flink.runtime.heartbeat.NoOpHeartbeatManager<I,O>
Type Parameters:
I - ignored
O - ignored
All Implemented Interfaces:
HeartbeatManager<I,O>, HeartbeatTarget<I>

public class NoOpHeartbeatManager<I,O> extends Object implements HeartbeatManager<I,O>
HeartbeatManager implementation which does nothing.
  • Method Details

    • monitorTarget

      public void monitorTarget(ResourceID resourceID, HeartbeatTarget<O> heartbeatTarget)
      Description copied from interface: HeartbeatManager
      Start monitoring a HeartbeatTarget. Heartbeat timeouts for this target are reported to the HeartbeatListener associated with this heartbeat manager.
      Specified by:
      monitorTarget in interface HeartbeatManager<I,O>
      Parameters:
      resourceID - Resource ID identifying the heartbeat target
      heartbeatTarget - Interface to send heartbeat requests and responses to the heartbeat target
    • unmonitorTarget

      public void unmonitorTarget(ResourceID resourceID)
      Description copied from interface: HeartbeatManager
      Stops monitoring the heartbeat target with the associated resource ID.
      Specified by:
      unmonitorTarget in interface HeartbeatManager<I,O>
      Parameters:
      resourceID - Resource ID of the heartbeat target which shall no longer be monitored
    • stop

      public void stop()
      Description copied from interface: HeartbeatManager
      Stops the heartbeat manager.
      Specified by:
      stop in interface HeartbeatManager<I,O>
    • getLastHeartbeatFrom

      public long getLastHeartbeatFrom(ResourceID resourceId)
      Description copied from interface: HeartbeatManager
      Returns the last received heartbeat from the given target.
      Specified by:
      getLastHeartbeatFrom in interface HeartbeatManager<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

      public CompletableFuture<Void> receiveHeartbeat(ResourceID heartbeatOrigin, I heartbeatPayload)
      Description copied from interface: HeartbeatTarget
      Sends a heartbeat response to the target. Each heartbeat response can carry a payload which contains additional information for the heartbeat target.
      Specified by:
      receiveHeartbeat in interface HeartbeatTarget<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

      public CompletableFuture<Void> requestHeartbeat(ResourceID requestOrigin, I heartbeatPayload)
      Description copied from interface: HeartbeatTarget
      Requests a heartbeat from the target. Each heartbeat request can carry a payload which contains additional information for the heartbeat target.
      Specified by:
      requestHeartbeat in interface HeartbeatTarget<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

      public static <A, B> NoOpHeartbeatManager<A,B> getInstance()