Package io.microraft.report
Interface RaftTerm
public interface RaftTerm
Contains a snapshot of a Raft node's current state in a term.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the known Raft leader endpoint in the current term, or null if unknown.int
getTerm()
Returns the term this Raft node is currently at.Returns the Raft endpoint that this Raft node has voted for in the current term, or null if none.
-
Method Details
-
getTerm
int getTerm()Returns the term this Raft node is currently at.- Returns:
- the term this Raft node is currently at
-
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
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
-