Class SimpleVoteQuorum

java.lang.Object
io.atomix.raft.utils.SimpleVoteQuorum
All Implemented Interfaces:
VoteQuorum

public class SimpleVoteQuorum extends Object implements VoteQuorum
  • Constructor Details

    • SimpleVoteQuorum

      public SimpleVoteQuorum(Consumer<Boolean> callback, Collection<MemberId> members)
      Parameters:
      callback - will be called with the result of the vote, either true or false.
      members - All members participating, including the local member.
  • Method Details

    • succeed

      public void succeed(MemberId member)
      Specified by:
      succeed in interface VoteQuorum
    • fail

      public void fail(MemberId member)
      Specified by:
      fail in interface VoteQuorum
    • cancel

      public void cancel()
      Cancels the quorum. Once this method has been called, the quorum will be marked complete and the handler will never be called.
      Specified by:
      cancel in interface VoteQuorum