Class HeartbeatReceiver<I>

  • Type Parameters:
    I - Type of the payload which is received by the heartbeat target
    All Implemented Interfaces:
    HeartbeatTarget<I>

    public abstract class HeartbeatReceiver<I>
    extends Object
    implements HeartbeatTarget<I>
    The receiver implementation of HeartbeatTarget, which mutes the HeartbeatTarget#requestHeartbeat(ResourceID, I). The extender only has to care about the receiving logic.
    • Constructor Detail

      • HeartbeatReceiver

        public HeartbeatReceiver()
    • Method Detail

      • requestHeartbeat

        public final 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