public static interface StateMachine.FollowerEventApi
| 限定符和类型 | 字段和说明 |
|---|---|
static StateMachine.FollowerEventApi |
DEFAULT
A noop implementation of
StateMachine.FollowerEventApi. |
| 限定符和类型 | 方法和说明 |
|---|---|
default void |
notifyExtendedNoLeader(org.apache.ratis.proto.RaftProtos.RoleInfoProto roleInfoProto)
Notify the
StateMachine that there is no leader in the group for an extended period of time. |
default CompletableFuture<TermIndex> |
notifyInstallSnapshotFromLeader(org.apache.ratis.proto.RaftProtos.RoleInfoProto roleInfoProto,
TermIndex firstTermIndexInLog)
Notify the
StateMachine that the leader has purged entries from its log. |
static final StateMachine.FollowerEventApi DEFAULT
StateMachine.FollowerEventApi.default void notifyExtendedNoLeader(org.apache.ratis.proto.RaftProtos.RoleInfoProto roleInfoProto)
StateMachine that there is no leader in the group for an extended period of time.
This notification is based on "raft.server.notification.no-leader.timeout".roleInfoProto - information about the current node role and rpc delay informationRaftServerConfigKeys.Notification.NO_LEADER_TIMEOUT_KEYdefault CompletableFuture<TermIndex> notifyInstallSnapshotFromLeader(org.apache.ratis.proto.RaftProtos.RoleInfoProto roleInfoProto, TermIndex firstTermIndexInLog)
StateMachine that the leader has purged entries from its log.
In order to catch up, the StateMachine has to install the latest snapshot asynchronously.roleInfoProto - information about the current node role and rpc delay information.firstTermIndexInLog - The term-index of the first append entry available in the leader's log.Copyright © 2017–2025 The Apache Software Foundation. All rights reserved.