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
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.lang.Booleanapply(GlobalFlagsT globalFlagsT, java.lang.String[] args)Process the command.default java.lang.Stringcategory()Return category of this command belongs to.java.lang.Stringdescription()Return description name.default booleanhidden()Returns whether to hide this command from showing in help message.java.lang.Stringname()Return command name.default java.lang.Stringpath()Return command path in a cli path.voidusage()Print the help information.
-
-
-
Method Detail
-
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 java.lang.String category()
Return category of this command belongs to.- Returns:
- category name
-
name
java.lang.String name()
Return command name.- Returns:
- command name.
-
path
default java.lang.String path()
Return command path in a cli path.This is used for printing usage information.
- Returns:
- command path
-
description
java.lang.String description()
Return description name.- Returns:
- description name.
-
apply
java.lang.Boolean apply(GlobalFlagsT globalFlagsT, java.lang.String[] args) throws java.lang.Exception
Process the command.- Parameters:
args- command args- Returns:
- true if successfully apply the args, otherwise false
- Throws:
java.lang.Exception
-
usage
void usage()
Print the help information.
-
-