Class CandidateRole


public class CandidateRole extends NonLeaderRole
Raft candidate role.
  • Method Details

    • getVotesRequired

      public int getVotesRequired()
      Get the number of votes required to win the election.
      Returns:
      required votes
    • getVotesReceived

      public int getVotesReceived()
      Get the number of votes received so far. Includes this node's vote.
      Returns:
      received votes
    • toString

      public String toString()
      Specified by:
      toString in class Role