Interface Command

All Known Implementing Classes:
AbstractCommand, AbstractKVCommand, AbstractRaftCommand, AbstractTransactionRaftCommand, CompareSchemasCommand, DecodeKeyCommand, DeleteSchemaCommand, InfoCommand, JsckCommand, KVGetCommand, KVLoadCommand, KVPutCommand, KVRemoveCommand, KVSaveCommand, LoadCommand, RaftAddCommand, RaftFallbackForceStandaloneCommand, RaftFallbackStatusCommand, RaftRemoveCommand, RaftStartElectionCommand, RaftStatusCommand, RaftStepDownCommand, SaveCommand, SetAllowNewSchemaCommand, SetLogLevelCommand, SetSessionModeCommand, SetValidationModeCommand, SetVerboseCommand, ShowAllSchemasCommand, ShowSchemaCommand

public interface Command
Session command.
See Also:
  • Method Details

    • getName

      String getName()
      Get the name of this command.
      Returns:
      command name
    • getUsage

      String getUsage()
      Get command usage string.
      Returns:
      command usage string
    • getHelpSummary

      String getHelpSummary()
      Get summarized help (typically a single line).
      Returns:
      one line command summary
    • getHelpDetail

      String getHelpDetail()
      Get expanded help (typically multiple lines).
      Returns:
      detailed command description
    • getSessionModes

      EnumSet<SessionMode> getSessionModes()
      Get the SessionMode(s) supported by this command.
      Returns:
      set of supported SessionModes
    • execute

      int execute(Session session, String name, List<String> args) throws InterruptedException
      Execute this command.
      Parameters:
      session - CLI session
      name - command name
      args - command line arguments
      Returns:
      command return value
      Throws:
      InterruptedException - if the current thread is interrupted
      IllegalArgumentException - if any parameter is null