public interface FollowerInfo
| 限定符和类型 | 字段和说明 |
|---|---|
static org.slf4j.Logger |
LOG |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
computeNextIndex(LongUnaryOperator op)
Set the nextIndex for this follower.
|
void |
decreaseNextIndex(long newNextIndex)
Decrease the nextIndex for this follower.
|
long |
getCommitIndex() |
RaftPeerId |
getId() |
Timestamp |
getLastHeartbeatSendTime() |
Timestamp |
getLastRespondedAppendEntriesSendTime() |
Timestamp |
getLastRpcResponseTime() |
Timestamp |
getLastRpcSendTime() |
Timestamp |
getLastRpcTime() |
long |
getMatchIndex() |
String |
getName() |
long |
getNextIndex() |
RaftPeer |
getPeer()
Return this follower's
RaftPeer. |
long |
getSnapshotIndex() |
boolean |
hasAttemptedToInstallSnapshot()
Return true if install snapshot has been attempted by the Follower at least once.
|
void |
increaseNextIndex(long newNextIndex)
Increase the nextIndex for this follower.
|
void |
setAttemptedToInstallSnapshot()
Acknowledge that Follower attempted to install a snapshot.
|
void |
setNextIndex(long newNextIndex)
Set the nextIndex for this follower.
|
void |
setSnapshotIndex(long newSnapshotIndex)
Set follower's snapshotIndex.
|
boolean |
updateCommitIndex(long newCommitIndex)
Update follower's commitIndex.
|
void |
updateLastRespondedAppendEntriesSendTime(Timestamp sendTime)
Update lastRpcResponseTime and LastRespondedAppendEntriesSendTime
|
void |
updateLastRpcResponseTime()
Update lastRpcResponseTime to the current time.
|
void |
updateLastRpcSendTime(boolean isHeartbeat)
Update lastRpcSendTime to the current time.
|
boolean |
updateMatchIndex(long newMatchIndex)
Update this follower's matchIndex.
|
void |
updateNextIndex(long newNextIndex)
Update the nextIndex for this follower.
|
String getName()
RaftPeerId getId()
RaftPeer getPeer()
RaftPeer.
To obtain the RaftPeerId, use getId() which is more efficient than this method.long getMatchIndex()
boolean updateMatchIndex(long newMatchIndex)
long getCommitIndex()
boolean updateCommitIndex(long newCommitIndex)
long getSnapshotIndex()
void setSnapshotIndex(long newSnapshotIndex)
void setAttemptedToInstallSnapshot()
boolean hasAttemptedToInstallSnapshot()
long getNextIndex()
void increaseNextIndex(long newNextIndex)
void decreaseNextIndex(long newNextIndex)
void setNextIndex(long newNextIndex)
void updateNextIndex(long newNextIndex)
void computeNextIndex(LongUnaryOperator op)
Timestamp getLastRpcResponseTime()
Timestamp getLastRpcSendTime()
void updateLastRpcResponseTime()
void updateLastRpcSendTime(boolean isHeartbeat)
Timestamp getLastRpcTime()
Timestamp getLastHeartbeatSendTime()
Timestamp getLastRespondedAppendEntriesSendTime()
void updateLastRespondedAppendEntriesSendTime(Timestamp sendTime)
Copyright © 2017–2025 The Apache Software Foundation. All rights reserved.