Class ObserverZooKeeperServer

    • Method Detail

      • getObserver

        public Observer getObserver()
      • getLearner

        public Learner getLearner()
        Description copied from class: LearnerZooKeeperServer
        Abstract method to return the learner associated with this server. Since the Learner may change under our feet (when QuorumPeer reassigns it) we can't simply take a reference here. Instead, we need the subclasses to implement this.
        Specified by:
        getLearner in class LearnerZooKeeperServer
      • commitRequest

        public void commitRequest​(Request request)
        Unlike a Follower, which sees a full request only during the PROPOSAL phase, Observers get all the data required with the INFORM packet. This method commits a request that has been unpacked by from an INFORM received from the Leader.
        Parameters:
        request -
      • setupRequestProcessors

        protected void setupRequestProcessors()
        Set up the request processors for an Observer: firstProcesor->commitProcessor->finalProcessor
        Overrides:
        setupRequestProcessors in class ZooKeeperServer
      • sync

        public void sync()