org.apache.zookeeper.server.quorum
Class Observer

java.lang.Object
  extended by org.apache.zookeeper.server.quorum.Learner
      extended by 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.


Field Summary
 
Fields inherited from class org.apache.zookeeper.server.quorum.Learner
bufferedOutput, leaderIs, leaderOs, leaderProtocolVersion, LOG, sock
 
Method Summary
protected  void processPacket(QuorumPacket qp)
          Controls the response of an observer to the receipt of a quorumpacket
 void shutdown()
          Shutdown the Observer.
 String toString()
           
 
Methods inherited from class org.apache.zookeeper.server.quorum.Learner
connectToLeader, findLeader, getPendingRevalidationsCount, getSocket, ping, registerWithLeader, revalidate, syncWithLeader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

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 © 2011 The Apache Software Foundation