Class ElectionRound


  • class ElectionRound
    extends Round
    The initial Round for a leaderless repository, used to establish a leader.
    • Field Detail

      • log

        private static final org.slf4j.Logger log
      • term

        private long term
    • Method Detail

      • start

        void start()
            throws java.io.IOException
        Description copied from class: Round
        Creates a commit for refs/txn/accepted and calls Round.runAsync(AnyObjectId) to begin execution of the round across the system.

        If references are being updated (such as in a ProposalRound) the RefTree may be modified.

        Invoked without KetchLeader.lock to build objects.

        Specified by:
        start in class Round
        Throws:
        java.io.IOException - the round cannot build new objects within the leader's repository. The leader may be unable to execute.
      • success

        void success()
        Description copied from class: Round
        Notify the round it was accepted by a majority of the system.

        Invoked by the leader with KetchLeader.lock held by the caller.

        Specified by:
        success in class Round
      • getTerm

        long getTerm()
      • parseTerm

        private static long parseTerm​(java.util.List<java.lang.String> footer)
      • blockUntil

        private void blockUntil​(ProposedTimestamp ts)
                         throws java.io.IOException
        Throws:
        java.io.IOException