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 TypeMethodDescriptionapply(GlobalFlagsT globalFlagsT, String[] args) Process the command.default Stringcategory()Return category of this command belongs to.Return description name.default booleanhidden()Returns whether to hide this command from showing in help message.name()Return command name.default Stringpath()Return command path in a cli path.voidusage()Print the help information.
-
Method Details
-
category
Return category of this command belongs to.- Returns:
- category name
-
name
String name()Return command name.- Returns:
- command name.
-
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
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.