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