T - Generic for getArg method which should return command-specific paramters which it would be run with.public interface Command<T>
| Modifier and Type | Method and Description |
|---|---|
T |
arg() |
default String |
confirmationPrompt() |
Object |
execute(GridClientConfiguration clientCfg,
Logger logger)
Actual command execution.
|
String |
name() |
default void |
parseArguments(CommandArgIterator argIterator)
Parse command-specific arguments.
|
default void |
prepareConfirmation(GridClientConfiguration clientCfg)
Prepares confirmation for the command.
|
void |
printUsage(Logger logger)
Print info for user about command (parameters, use cases and so on).
|
static GridClient |
startClient(GridClientConfiguration clientCfg)
Method to create thin client for communication with cluster.
|
static void |
usage(Logger logger,
String desc,
CommandList cmd,
String... args)
Print command usage.
|
static GridClient startClient(GridClientConfiguration clientCfg) throws Exception
clientCfg - Thin client configuration.Exception - If error occur.static void usage(Logger logger, String desc, CommandList cmd, String... args)
logger - Logger to use.desc - Command description.args - Arguments.Object execute(GridClientConfiguration clientCfg, Logger logger) throws Exception
clientCfg - Thin client configuration if connection to cluster is necessary.logger - Logger to use.Exception - If error occur.default void prepareConfirmation(GridClientConfiguration clientCfg) throws Exception
clientCfg - Thin client configuration.Exception - If error occur.default String confirmationPrompt()
default void parseArguments(CommandArgIterator argIterator)
argIterator - Argument iterator.T arg()
parseArguments(CommandArgIterator) call.void printUsage(Logger logger)
logger - Logger to use.String name()
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.8.0 Release Date : February 27 2020