org.apache.zookeeper.server.quorum
Class Observer
java.lang.Object
org.apache.zookeeper.server.quorum.Learner
org.apache.zookeeper.server.quorum.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.
toString
public String toString()
- Overrides:
toString
in class Object
processPacket
protected void processPacket(QuorumPacket qp)
throws IOException
- Controls the response of an observer to the receipt of a quorumpacket
- Parameters:
qp
-
- Throws:
IOException
shutdown
public void shutdown()
- Shutdown the Observer.
- Overrides:
shutdown
in class Learner
Copyright © 2012 The Apache Software Foundation