Interface Command<GlobalFlagsT extends CliFlags>

All Known Subinterfaces:
CommandGroup<GlobalFlagsT>
All Known Implementing Classes:
AdminCommand, BKCommand, BookieCommand, CheckDBLedgersIndexCommand, CliCommand, CliCommandGroup, ClientCommand, ClusterInfoCommand, ConvertToDBStorageCommand, ConvertToInterleavedStorageCommand, CookieCommand, CreateCookieCommand, DecommissionCommand, DeleteCookieCommand, DeleteLedgerCommand, DiscoveryCommand, EndpointInfoCommand, FlipBookieIdCommand, FormatCommand, GenerateCookieCommand, GetCookieCommand, HelpCommand, InfoCommand, InitCommand, InitCommand, InstanceIdCommand, LastMarkCommand, LedgerCommand, LedgerMetaDataCommand, ListActiveLedgersCommand, ListBookiesCommand, ListFilesOnDiscCommand, ListLedgersCommand, ListUnderReplicatedCommand, LocalConsistencyCheckCommand, LostBookieRecoveryDelayCommand, MetaFormatCommand, NukeExistingClusterCommand, QueryAutoRecoveryStatusCommand, ReadJournalCommand, ReadLedgerCommand, ReadLogCommand, ReadLogMetadataCommand, RebuildDBLedgerLocationsIndexCommand, RebuildDBLedgersIndexCommand, RecoverCommand, RegenerateInterleavedStorageIndexFileCommand, SanityTestCommand, SimpleTestCommand, SwitchOfHealthCheckCommand, ToggleCommand, TriggerAuditCommand, UpdateBookieInLedgerCommand, UpdateCookieCommand, WhoIsAuditorCommand

public interface Command<GlobalFlagsT extends CliFlags>
Command of a cli.
  • Method Summary

    Modifier and Type
    Method
    Description
    apply(GlobalFlagsT globalFlagsT, String[] args)
    Process the command.
    default String
    Return category of this command belongs to.
    Return description name.
    default boolean
    Returns whether to hide this command from showing in help message.
    Return command name.
    default String
    Return command path in a cli path.
    void
    Print the help information.
  • Method Details

    • hidden

      default boolean hidden()
      Returns whether to hide this command from showing in help message.
      Returns:
      true if hide this command from help message.
    • category

      default String category()
      Return category of this command belongs to.
      Returns:
      category name
    • name

      String name()
      Return command name.
      Returns:
      command name.
    • path

      default String path()
      Return command path in a cli path.

      This is used for printing usage information.

      Returns:
      command path
    • description

      String description()
      Return description name.
      Returns:
      description name.
    • apply

      Boolean apply(GlobalFlagsT globalFlagsT, String[] args) throws Exception
      Process the command.
      Parameters:
      args - command args
      Returns:
      true if successfully apply the args, otherwise false
      Throws:
      Exception
    • usage

      void usage()
      Print the help information.