Class Follower
- java.lang.Object
-
- org.apache.zookeeper.server.quorum.Learner
-
- org.apache.zookeeper.server.quorum.Follower
-
public class Follower extends Learner
This class has the control logic for the Follower.
-
-
Field Summary
-
Fields inherited from class org.apache.zookeeper.server.quorum.Learner
bufferedOutput, leaderIs, leaderOs, leaderProtocolVersion, LOG, sock
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected longgetLastQueued()The zxid of the last operation queuedlonggetZxid()The zxid of the last operation seenprotected voidprocessPacket(QuorumPacket qp)Examine the packet received in qp and dispatch based on its contents.voidshutdown()Shutdown the Peerjava.lang.StringtoString()-
Methods inherited from class org.apache.zookeeper.server.quorum.Learner
connectToLeader, findLeader, getPendingRevalidationsCount, getSocket, ping, registerWithLeader, revalidate, syncWithLeader
-
-
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
processPacket
protected void processPacket(QuorumPacket qp) throws java.io.IOException
Examine the packet received in qp and dispatch based on its contents.- Parameters:
qp-- Throws:
java.io.IOException
-
getZxid
public long getZxid()
The zxid of the last operation seen- Returns:
- zxid
-
getLastQueued
protected long getLastQueued()
The zxid of the last operation queued- Returns:
- zxid
-
-