Class Observer


  • public class Observer
    extends Learner
    Observers are peers that do not take part in the atomic broadcast protocol. Instead, they are informed of successful proposals by the Leader. Observers therefore naturally act as a relay point for publishing the proposal stream and can relieve Followers of some of the connection load. Observers may submit proposals, but do not vote in their acceptance. See ZOOKEEPER-368 for a discussion of this feature.
    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • processPacket

        protected void processPacket​(QuorumPacket qp)
                              throws java.io.IOException
        Controls the response of an observer to the receipt of a quorumpacket
        Parameters:
        qp -
        Throws:
        java.io.IOException
      • shutdown

        public void shutdown()
        Shutdown the Observer.
        Overrides:
        shutdown in class Learner