Class StateCommand
- java.lang.Object
-
- org.apache.ignite.internal.management.StateCommand
-
- All Implemented Interfaces:
Command<NoArg,GridTuple3<UUID,String,ClusterState>>,LocalCommand<NoArg,GridTuple3<UUID,String,ClusterState>>
public class StateCommand extends Object implements LocalCommand<NoArg,GridTuple3<UUID,String,ClusterState>>
-
-
Field Summary
-
Fields inherited from interface org.apache.ignite.internal.management.api.Command
CMD_NAME_POSTFIX
-
-
Constructor Summary
Constructors Constructor Description StateCommand()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class<NoArg>argClass()Stringdescription()Command description.GridTuple3<UUID,String,ClusterState>execute(@Nullable GridClient cli, @Nullable IgniteClient client, @Nullable Ignite ignite, NoArg 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
confirmationPrompt, deprecationMessage
-
-
-
-
Method Detail
-
description
public String description()
Command description.- Specified by:
descriptionin interfaceCommand<NoArg,GridTuple3<UUID,String,ClusterState>>
-
argClass
public Class<NoArg> argClass()
- Specified by:
argClassin interfaceCommand<NoArg,GridTuple3<UUID,String,ClusterState>>- Returns:
- Arguments class.
-
execute
public GridTuple3<UUID,String,ClusterState> execute(@Nullable @Nullable GridClient cli, @Nullable @Nullable IgniteClient client, @Nullable @Nullable Ignite ignite, NoArg arg, Consumer<String> printer) throws Exception
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<NoArg,GridTuple3<UUID,String,ClusterState>>- Parameters:
cli- Optional grid client instance.ignite- Optional ignite node.arg- Command argument.printer- Results printer.- Returns:
- Command result.
- Throws:
Exception
- CLI utility using
-
-