Class LearnerZooKeeperServer

    • Constructor Detail

      • LearnerZooKeeperServer

        public LearnerZooKeeperServer​(FileTxnSnapLog logFactory,
                                      int tickTime,
                                      int minSessionTimeout,
                                      int maxSessionTimeout,
                                      int listenBacklog,
                                      ZKDatabase zkDb,
                                      QuorumPeer self)
                               throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • getLearner

        public abstract Learner getLearner()
        Abstract method to return the learner associated with this server. Since the Learner may change under our feet (when QuorumPeer reassigns it) we can't simply take a reference here. Instead, we need the subclasses to implement this.
      • getTouchSnapshot

        protected java.util.Map<java.lang.Long,​java.lang.Integer> getTouchSnapshot()
        Returns the current state of the session tracker. This is only currently used by a Learner to build a ping response packet.
      • revalidateSession

        protected void revalidateSession​(ServerCnxn cnxn,
                                         long sessionId,
                                         int sessionTimeout)
                                  throws java.io.IOException
        Overrides:
        revalidateSession in class ZooKeeperServer
        Throws:
        java.io.IOException
      • unregisterJMX

        protected void unregisterJMX​(Learner peer)