I - ignoredO - ignoredpublic class NoOpHeartbeatManager<I,O> extends Object implements HeartbeatManager<I,O>
HeartbeatManager implementation which does nothing.| 限定符和类型 | 方法和说明 |
|---|---|
static <A,B> NoOpHeartbeatManager<A,B> |
getInstance() |
long |
getLastHeartbeatFrom(ResourceID resourceId)
Returns the last received heartbeat from the given target.
|
void |
monitorTarget(ResourceID resourceID,
HeartbeatTarget<O> heartbeatTarget)
Start monitoring a
HeartbeatTarget. |
CompletableFuture<Void> |
receiveHeartbeat(ResourceID heartbeatOrigin,
I heartbeatPayload)
Sends a heartbeat response to the target.
|
CompletableFuture<Void> |
requestHeartbeat(ResourceID requestOrigin,
I heartbeatPayload)
Requests a heartbeat from the target.
|
void |
stop()
Stops the heartbeat manager.
|
void |
unmonitorTarget(ResourceID resourceID)
Stops monitoring the heartbeat target with the associated resource ID.
|
public void monitorTarget(ResourceID resourceID, HeartbeatTarget<O> heartbeatTarget)
HeartbeatManagerHeartbeatTarget. Heartbeat timeouts for this target are reported
to the HeartbeatListener associated with this heartbeat manager.monitorTarget 在接口中 HeartbeatManager<I,O>resourceID - Resource ID identifying the heartbeat targetheartbeatTarget - Interface to send heartbeat requests and responses to the heartbeat
targetpublic void unmonitorTarget(ResourceID resourceID)
HeartbeatManagerunmonitorTarget 在接口中 HeartbeatManager<I,O>resourceID - Resource ID of the heartbeat target which shall no longer be monitoredpublic void stop()
HeartbeatManagerstop 在接口中 HeartbeatManager<I,O>public long getLastHeartbeatFrom(ResourceID resourceId)
HeartbeatManagergetLastHeartbeatFrom 在接口中 HeartbeatManager<I,O>resourceId - for which to return the last heartbeatpublic CompletableFuture<Void> receiveHeartbeat(ResourceID heartbeatOrigin, I heartbeatPayload)
HeartbeatTargetreceiveHeartbeat 在接口中 HeartbeatTarget<I>heartbeatOrigin - Resource ID identifying the machine for which a heartbeat shall be
reported.heartbeatPayload - Payload of the heartbeat. Null indicates an empty payload.public CompletableFuture<Void> requestHeartbeat(ResourceID requestOrigin, I heartbeatPayload)
HeartbeatTargetrequestHeartbeat 在接口中 HeartbeatTarget<I>requestOrigin - Resource ID identifying the machine issuing the heartbeat request.heartbeatPayload - Payload of the heartbeat request. Null indicates an empty payload.public static <A,B> NoOpHeartbeatManager<A,B> getInstance()
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.