Interface RaftLogStats


public interface RaftLogStats
Contains statistics about a Raft node's Raft log.
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    Returns index of the highest log entry known to be committed.
    Returns the indices of the last known appended Raft log entries on the followers.
    int
    Returns the number of snapshots installed by a Raft node.
    long
    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.
    int
    Returns the last term in the Raft log, either from the last log entry or from the last locally taken or installed snapshot.
    long
    Returns the log index of the last locally taken or installed snapshot.
    int
    Returns the term of the last locally taken or installed snapshot.
    int
    Returns 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