Class FourLetterCommands


  • public class FourLetterCommands
    extends Object
    This class contains constants for all the four letter commands
    • Field Detail

      • confCmd

        public static final int confCmd
      • consCmd

        public static final int consCmd
      • crstCmd

        public static final int crstCmd
      • dirsCmd

        public static final int dirsCmd
      • dumpCmd

        public static final int dumpCmd
      • enviCmd

        public static final int enviCmd
      • getTraceMaskCmd

        public static final int getTraceMaskCmd
      • ruokCmd

        public static final int ruokCmd
      • setTraceMaskCmd

        public static final int setTraceMaskCmd
      • srvrCmd

        public static final int srvrCmd
      • srstCmd

        public static final int srstCmd
      • statCmd

        public static final int statCmd
      • wchcCmd

        public static final int wchcCmd
      • wchpCmd

        public static final int wchpCmd
      • wchsCmd

        public static final int wchsCmd
      • mntrCmd

        public static final int mntrCmd
      • isroCmd

        public static final int isroCmd
      • hashCmd

        protected static final int hashCmd
    • Constructor Detail

      • FourLetterCommands

        public FourLetterCommands()
    • Method Detail

      • resetWhiteList

        public static void resetWhiteList()
      • getCommandString

        public static String getCommandString​(int command)
        Return the string representation of the specified command code.
      • isKnown

        public static boolean isKnown​(int command)
        Check if the specified command code is from a known command.
        Parameters:
        command - The integer code of command.
        Returns:
        true if the specified command is known, false otherwise.
      • isEnabled

        public static boolean isEnabled​(String command)
        Check if the specified command is enabled. In ZOOKEEPER-2693 we introduce a configuration option to only allow a specific set of white listed commands to execute. A command will only be executed if it is also configured in the white list.
        Parameters:
        command - The command string.
        Returns:
        true if the specified command is enabled