Class QuorumVote<V extends Vote,​T>

  • Direct Known Subclasses:
    QuorumVoteServerConnect

    public abstract class QuorumVote<V extends Vote,​T>
    extends Object
    the vote itself. the vote can be decided by the enquirer or sent out to each node in the quorum.
    • Constructor Detail

    • Method Detail

      • connected

        public abstract Vote connected()
        called by the QuorumManager when one of the nodes in the quorum is successfully connected to. The QuorumVote can then decide whether or not a decision can be made with just that information.
        Returns:
        the vote to use
      • notConnected

        public abstract Vote notConnected()
        called by the QuorumManager fails to connect to a node in the quorum. The QuorumVote can then decide whether or not a decision can be made with just that information however the node cannot cannot be asked.
        Returns:
        the vote to use
      • vote

        public abstract void vote​(V vote)
        called by the QuorumManager when a vote can be made, either from the cluster or decided by itself.
        Parameters:
        vote - the vote to make.
      • getDecision

        public abstract T getDecision()
        get the decion of the vote
        Returns:
        the voting decision
      • allVotesCast

        public abstract void allVotesCast​(Topology voteTopology)
        called by the QuorumManager when all the votes have been cast and received.
        Parameters:
        voteTopology - the topology of where the votes were sent.
      • getName

        public SimpleString getName()
        the name of this quorum vote, used for identifying the correct QuorumVoteHandler
        Returns:
        the name of the wuorum vote