Class FollowerRole


public class FollowerRole extends NonLeaderRole
Raft follower role.
  • Method Details

    • getLeaderIdentity

      public String getLeaderIdentity()
      Get the identity of my leader, if known.
      Returns:
      leader identity, or null if not known
    • getLeaderAddress

      public String getLeaderAddress()
      Get the address of my leader, if known.
      Returns:
      leader address, or null if not known
    • getVotedFor

      public String getVotedFor()
      Get the identity of the node that this node voted for this term, if any.
      Returns:
      node voted for, or null if none
    • isInstallingSnapshot

      public boolean isInstallingSnapshot()
      Determine whether this node is currently in the process of receiving a whole database snapshot download.
      Returns:
      true if snapshot install is in progress
    • getNodesProbed

      public int getNodesProbed()
      Determine the number of nodes (including this node) that this node has successfully probed when probing for a majority of nodes with PingRequests prior to reverting to a candidate.
      Returns:
      the number of other nodes this node has successfully probed, or -1 if not probing
    • toString

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