Class Commands.ZabStateCommand

  • All Implemented Interfaces:
    Command
    Enclosing class:
    Commands

    public static class Commands.ZabStateCommand
    extends GetCommand
    Returns the current phase of Zab protocol that peer is running. It can be in one of these phases: ELECTION, DISCOVERY, SYNCHRONIZATION, BROADCAST
    • Constructor Detail

      • ZabStateCommand

        public ZabStateCommand()
    • Method Detail

      • runGet

        public CommandResponse runGet​(ZooKeeperServer zkServer,
                                      Map<String,​String> kwargs)
        Description copied from interface: Command
        Run this command for HTTP GET request. Commands take a ZooKeeperServer, String-valued keyword arguments and return a CommandResponse object containing any information constituting the response to the command. Commands are responsible for parsing keyword arguments and performing any error handling if necessary. Errors should be reported by setting the "error" entry of the returned map with an appropriate message rather than throwing an exception.
        Parameters:
        zkServer - ZooKeeper server
        kwargs - keyword -> argument value mapping
        Returns:
        CommandResponse representing response to command containing at minimum: - "command" key containing the command's primary name - "error" key containing a String error message or null if no error