public interface LeaderState
| 限定符和类型 | 接口和说明 |
|---|---|
static class |
LeaderState.StepDownReason
The reasons that this leader steps down and becomes a follower.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
checkHealth(FollowerInfo follower)
Check if the follower is healthy.
|
boolean |
isFollowerBootstrapping(FollowerInfo follower)
Check if a follower is bootstrapping.
|
org.apache.ratis.proto.RaftProtos.AppendEntriesRequestProto |
newAppendEntriesRequestProto(FollowerInfo follower,
List<org.apache.ratis.proto.RaftProtos.LogEntryProto> entries,
TermIndex previous,
long callId) |
void |
onAppendEntriesReply(LogAppender appender,
org.apache.ratis.proto.RaftProtos.AppendEntriesReplyProto reply)
Received an
RaftProtos.AppendEntriesReplyProto |
void |
onFollowerCommitIndex(FollowerInfo follower,
long commitIndex)
Handle the event that the follower has replied a commit index.
|
void |
onFollowerSuccessAppendEntries(FollowerInfo follower)
Handle the event that the follower has replied a success append entries.
|
boolean |
onFollowerTerm(FollowerInfo follower,
long followerTerm)
Handle the event that the follower has replied a term.
|
void |
restart(LogAppender appender)
Restart the given
LogAppender. |
void restart(LogAppender appender)
LogAppender.org.apache.ratis.proto.RaftProtos.AppendEntriesRequestProto newAppendEntriesRequestProto(FollowerInfo follower, List<org.apache.ratis.proto.RaftProtos.LogEntryProto> entries, TermIndex previous, long callId)
RaftProtos.AppendEntriesRequestProto object.void checkHealth(FollowerInfo follower)
boolean onFollowerTerm(FollowerInfo follower, long followerTerm)
void onFollowerCommitIndex(FollowerInfo follower, long commitIndex)
void onFollowerSuccessAppendEntries(FollowerInfo follower)
boolean isFollowerBootstrapping(FollowerInfo follower)
void onAppendEntriesReply(LogAppender appender, org.apache.ratis.proto.RaftProtos.AppendEntriesReplyProto reply)
RaftProtos.AppendEntriesReplyProtoCopyright © 2017–2025 The Apache Software Foundation. All rights reserved.