Class QuorumZooKeeperServer

    • Constructor Detail

      • QuorumZooKeeperServer

        protected QuorumZooKeeperServer​(FileTxnSnapLog logFactory,
                                        int tickTime,
                                        int minSessionTimeout,
                                        int maxSessionTimeout,
                                        int listenBacklog,
                                        ZKDatabase zkDb,
                                        QuorumPeer self)
    • Method Detail

      • upgrade

        public void upgrade​(long sessionId)
        Implements the SessionUpgrader interface,
        Parameters:
        sessionId -
      • setLocalSessionFlag

        protected void setLocalSessionFlag​(Request si)
        Description copied from class: ZooKeeperServer
        If the underlying Zookeeper server support local session, this method will set a isLocalSession to true if a request is associated with a local session.
        Overrides:
        setLocalSessionFlag in class ZooKeeperServer
      • setState

        protected void setState​(ZooKeeperServer.State state)
        Description copied from class: ZooKeeperServer
        Sets the state of ZooKeeper server. After changing the state, it notifies the server state change to a registered shutdown handler, if any.

        The following are the server state transitions:

        • During startup the server will be in the INITIAL state.
        • After successfully starting, the server sets the state to RUNNING.
        • The server transitions to the ERROR state if it hits an internal error. ZooKeeperServerListenerImpl notifies any critical resource error events, e.g., SyncRequestProcessor not being able to write a txn to disk.
        • During shutdown the server sets the state to SHUTDOWN, which corresponds to the server not running.
      • During maintenance (e.g. restore) the server sets the state to MAINTENANCE
Overrides:
setState in class ZooKeeperServer
Parameters:
state - new server state.