Package io.microraft.report
Interface RaftLogStats
-
public interface RaftLogStatsContains statistics about a Raft node's Raft log.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description longgetCommitIndex()Returns index of the highest log entry known to be committed.Map<RaftEndpoint,Long>getFollowerMatchIndices()Returns the indices of the last known appended Raft log entries on the followers.intgetInstallSnapshotCount()Returns the number of snapshots installed by a Raft node.longgetLastLogOrSnapshotIndex()Returns the last log entry index in the Raft log, either from the last log entry or from the last locally taken or installed snapshot.intgetLastLogOrSnapshotTerm()Returns the last term in the Raft log, either from the last log entry or from the last locally taken or installed snapshot.longgetLastSnapshotIndex()Returns the log index of the last locally taken or installed snapshot.intgetLastSnapshotTerm()Returns the term of the last locally taken or installed snapshot.intgetTakeSnapshotCount()Returns the number of snapshots are taken by a Raft node.
-
-
-
Method Detail
-
getCommitIndex
long getCommitIndex()
Returns index of the highest log entry known to be committed.- Returns:
- index of the highest log entry known to be committed
-
getLastLogOrSnapshotTerm
int getLastLogOrSnapshotTerm()
Returns the last term in the Raft log, either from the last log entry or from the last locally taken or installed snapshot.- Returns:
- the last term in the Raft log, either from the last log entry or from the last locally taken or installed snapshot
-
getLastLogOrSnapshotIndex
long getLastLogOrSnapshotIndex()
Returns the last log entry index in the Raft log, either from the last log entry or from the last locally taken or installed snapshot.- Returns:
- the last log entry index in the Raft log, either from the last log entry or from the last locally taken or installed snapshot
-
getLastSnapshotTerm
int getLastSnapshotTerm()
Returns the term of the last locally taken or installed snapshot.- Returns:
- the term of the last locally taken or installed snapshot
-
getLastSnapshotIndex
long getLastSnapshotIndex()
Returns the log index of the last locally taken or installed snapshot.- Returns:
- the log index of the last locally taken or installed snapshot
-
getTakeSnapshotCount
int getTakeSnapshotCount()
Returns the number of snapshots are taken by a Raft node.- Returns:
- the number of snapshots are taken by a Raft node
-
getInstallSnapshotCount
int getInstallSnapshotCount()
Returns the number of snapshots installed by a Raft node.- Returns:
- the number of snapshots installed by a Raft node
-
getFollowerMatchIndices
Map<RaftEndpoint,Long> getFollowerMatchIndices()
Returns the indices of the last known appended Raft log entries on the followers.This map is non-empty only for the leader Raft node. Followers return an empty map.
- Returns:
- the indices of the last known appended Raft log entries on the followers
-
-