Class FourLetterCommands
java.lang.Object
org.apache.zookeeper.server.command.FourLetterCommands
This class contains constants for all the four letter commands
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
protected static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
getCommandString
(int command) Return the string representation of the specified command code.static boolean
Check if the specified command is enabled.static boolean
isKnown
(int command) Check if the specified command code is from a known command.static void
-
Field Details
-
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 -
telnetCloseCmd
public static final int telnetCloseCmd- See Also:
-
-
Constructor Details
-
FourLetterCommands
public FourLetterCommands()
-
-
Method Details
-
resetWhiteList
public static void resetWhiteList() -
getCommandString
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
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
-