Class SetStateCommand
- java.lang.Object
-
- org.apache.ignite.internal.management.SetStateCommand
-
- All Implemented Interfaces:
Command<SetStateCommandArg,Boolean>,LocalCommand<SetStateCommandArg,Boolean>
public class SetStateCommand extends Object implements LocalCommand<SetStateCommandArg,Boolean>
-
-
Field Summary
-
Fields inherited from interface org.apache.ignite.internal.management.api.Command
CMD_NAME_POSTFIX
-
-
Constructor Summary
Constructors Constructor Description SetStateCommand()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class<SetStateCommandArg>argClass()StringconfirmationPrompt(SetStateCommandArg arg)Stringdescription()Command description.Booleanexecute(@Nullable GridClient cli, @Nullable IgniteClient client, @Nullable Ignite ignite, SetStateCommandArg arg, Consumer<String> printer)Executes command logic.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.ignite.internal.management.api.Command
deprecationMessage
-
-
-
-
Method Detail
-
description
public String description()
Command description.- Specified by:
descriptionin interfaceCommand<SetStateCommandArg,Boolean>
-
argClass
public Class<SetStateCommandArg> argClass()
- Specified by:
argClassin interfaceCommand<SetStateCommandArg,Boolean>- Returns:
- Arguments class.
-
execute
public Boolean execute(@Nullable @Nullable GridClient cli, @Nullable @Nullable IgniteClient client, @Nullable @Nullable Ignite ignite, SetStateCommandArg arg, Consumer<String> printer) throws GridClientException
Executes command logic. Commands invoked in two different environments:- CLI utility using
GridClientconnection to interact with cluster. - Inside
Ignitenode therefore local node can be used to interact with cluster.
GridClientprotocol is obsolete and can be removed in future releases.- Specified by:
executein interfaceLocalCommand<SetStateCommandArg,Boolean>- Parameters:
cli- Optional grid client instance.ignite- Optional ignite node.arg- Command argument.printer- Results printer.- Returns:
- Command result.
- Throws:
GridClientException
- CLI utility using
-
confirmationPrompt
public String confirmationPrompt(SetStateCommandArg arg)
- Specified by:
confirmationPromptin interfaceCommand<SetStateCommandArg,Boolean>- Parameters:
arg- Command argument.- Returns:
- Message text to show user for. If
nullit means that confirmation is not needed.
-
-