public static interface StateMachine.LeaderEventApi
| 限定符和类型 | 字段和说明 |
|---|---|
static StateMachine.LeaderEventApi |
DEFAULT
A noop implementation of
StateMachine.LeaderEventApi. |
| 限定符和类型 | 方法和说明 |
|---|---|
default void |
notifyFollowerSlowness(org.apache.ratis.proto.RaftProtos.RoleInfoProto leaderInfo)
已过时。
Use
#notifyFollowerSlowness(RoleInfoProto, RaftPeer). |
default void |
notifyFollowerSlowness(org.apache.ratis.proto.RaftProtos.RoleInfoProto leaderInfo,
RaftPeer slowFollower)
Notify the
StateMachine that the given follower is slow. |
default void |
notifyLeaderReady()
Notify the
StateMachine that this server becomes ready after changed to leader. |
default void |
notifyNotLeader(Collection<TransactionContext> pendingEntries)
Notify
StateMachine that this server is no longer the leader. |
static final StateMachine.LeaderEventApi DEFAULT
StateMachine.LeaderEventApi.default void notifyFollowerSlowness(org.apache.ratis.proto.RaftProtos.RoleInfoProto leaderInfo, RaftPeer slowFollower)
StateMachine that the given follower is slow.
This notification is based on "raft.server.rpc.slowness.timeout".leaderInfo - information about the current node role and rpc delay informationslowFollower - The follower being slow.RaftServerConfigKeys.Rpc.SLOWNESS_TIMEOUT_KEY@Deprecated default void notifyFollowerSlowness(org.apache.ratis.proto.RaftProtos.RoleInfoProto leaderInfo)
#notifyFollowerSlowness(RoleInfoProto, RaftPeer).default void notifyNotLeader(Collection<TransactionContext> pendingEntries) throws IOException
StateMachine that this server is no longer the leader.IOExceptiondefault void notifyLeaderReady()
StateMachine that this server becomes ready after changed to leader.Copyright © 2017–2025 The Apache Software Foundation. All rights reserved.