Package io.microraft.report
Interface RaftLogStats
public interface RaftLogStats
Contains statistics about a Raft node's Raft log.
-
Method Summary
Modifier and TypeMethodDescriptionlongReturns index of the highest log entry known to be committed.Returns the indices of the last known appended Raft log entries on the followers.intReturns the number of snapshots installed by a Raft node.longReturns the last log entry index in the Raft log, either from the last log entry or from the last locally taken or installed snapshot.intReturns the last term in the Raft log, either from the last log entry or from the last locally taken or installed snapshot.longReturns the log index of the last locally taken or installed snapshot.intReturns the term of the last locally taken or installed snapshot.intReturns the number of snapshots are taken by a Raft node.
-
Method Details
-
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.- Returns:
- the indices of the last known appended Raft log entries on the followers
-