Module org.elasticsearch.server
Class StoreHeartbeatService
java.lang.Object
org.elasticsearch.cluster.coordination.stateless.StoreHeartbeatService
- All Implemented Interfaces:
LeaderHeartbeatService
-
Field Summary
FieldsModifier and TypeFieldDescriptionFields inherited from interface org.elasticsearch.cluster.coordination.LeaderHeartbeatService
NO_OP
-
Constructor Summary
ConstructorsConstructorDescriptionStoreHeartbeatService
(HeartbeatStore heartbeatStore, ThreadPool threadPool, TimeValue heartbeatFrequency, TimeValue maxTimeSinceLastHeartbeat, Consumer<ActionListener<OptionalLong>> currentTermSupplier) -
Method Summary
Modifier and TypeMethodDescriptionprotected long
static StoreHeartbeatService
create
(HeartbeatStore heartbeatStore, ThreadPool threadPool, Settings settings, Consumer<ActionListener<OptionalLong>> currentTermSupplier) void
start
(DiscoveryNode currentLeader, long term, ActionListener<Long> completionListener) Start a heartbeat process for the given term.void
stop()
-
Field Details
-
HEARTBEAT_FREQUENCY
-
MAX_MISSED_HEARTBEATS
-
-
Constructor Details
-
StoreHeartbeatService
public StoreHeartbeatService(HeartbeatStore heartbeatStore, ThreadPool threadPool, TimeValue heartbeatFrequency, TimeValue maxTimeSinceLastHeartbeat, Consumer<ActionListener<OptionalLong>> currentTermSupplier)
-
-
Method Details
-
create
public static StoreHeartbeatService create(HeartbeatStore heartbeatStore, ThreadPool threadPool, Settings settings, Consumer<ActionListener<OptionalLong>> currentTermSupplier) -
start
Description copied from interface:LeaderHeartbeatService
Start a heartbeat process for the given term. The listener is notified when the heartbeat process completes, which may happen if it fails to write a heartbeat, or a newer term is discovered.- Specified by:
start
in interfaceLeaderHeartbeatService
-
stop
public void stop()- Specified by:
stop
in interfaceLeaderHeartbeatService
-
absoluteTimeInMillis
protected long absoluteTimeInMillis()
-