Interface RaftTerm


  • public interface RaftTerm
    Contains a snapshot of a Raft node's current state in a term.
    • Method Detail

      • getTerm

        int getTerm()
        Returns the term this Raft node is currently at.
        Returns:
        the term this Raft node is currently at
      • getLeaderEndpoint

        @Nullable
        RaftEndpoint getLeaderEndpoint()
        Returns the known Raft leader endpoint in the current term, or null if unknown. For a non-leader Raft node, if this method returns a non-null Raft endpoint, it means the local Raft node has recently received a heartbeat from the leader.
        Returns:
        the known Raft leader endpoint in the current term, or null if unknown
      • getVotedEndpoint

        @Nullable
        RaftEndpoint getVotedEndpoint()
        Returns the Raft endpoint that this Raft node has voted for in the current term, or null if none.
        Returns:
        the Raft endpoint that this Raft node has voted for in the current term, or null if none