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, closeSocketAsync, leaderAddr, leaderIs, leaderOs, leaderProtocolVersion, LEARNER_ASYNC_SENDING, LEARNER_CLOSE_SOCKET_ASYNC, LOG, messageTracker, sock, sockBeingClosed
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected long
getLastQueued()
The zxid of the last operation queuedIterable<Map<String,Object>>
getSyncedObserversInfo()
Integer
getSyncedObserverSize()
long
getZxid()
The zxid of the last operation seenprotected void
processPacket(QuorumPacket qp)
Examine the packet received in qp and dispatch based on its contents.void
resetObserverConnectionStats()
void
shutdown()
Shutdown the PeerString
toString()
-
Methods inherited from class org.apache.zookeeper.server.quorum.Learner
connectToLeader, createSocket, findLeader, getAsyncSending, getPendingRevalidationsCount, getSocket, nanoTime, ping, registerWithLeader, revalidate, setAsyncSending, sockConnect, startSendingThread, syncWithLeader
-
-
-
-
Method Detail
-
processPacket
protected void processPacket(QuorumPacket qp) throws Exception
Examine the packet received in qp and dispatch based on its contents.- Parameters:
qp
-- Throws:
IOException
Exception
-
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
-
getSyncedObserverSize
public Integer getSyncedObserverSize()
-
resetObserverConnectionStats
public void resetObserverConnectionStats()
-
-