You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "nizhikov (via GitHub)" <gi...@apache.org> on 2023/06/07 08:56:41 UTC

[GitHub] [ignite] nizhikov commented on a diff in pull request #10675: IGNITE-15629 Management API introduced

nizhikov commented on code in PR #10675:
URL: https://github.com/apache/ignite/pull/10675#discussion_r1221196751


##########
modules/core/src/main/java/org/apache/ignite/internal/management/api/Command.java:
##########
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.management.api;
+
+import org.apache.ignite.internal.dto.IgniteDataTransferObject;
+import org.jetbrains.annotations.Nullable;
+
+/**
+ * Management command interface.
+ * Implementations represent single action to manage Ignite cluster.
+ *
+ * Name of the command that is expected from caller derived from actual command class name.
+ * Name format: all words divided by capital letters except "Command" suffix will form hierarchical command name.
+ * Example: {@code MyUsefullCommand} is name of command so {@code control.sh --my-usefull param1 param2} expected from user.
+ * Other protocols must expose command similarly. Rest API must expect {@code /api-root/my-usefull?param1=value1&param2=value2} URI.
+ *
+ * @param <A> Argument type.
+ * @param <R> Result type.
+ */
+public interface Command<A extends IgniteDataTransferObject, R> {
+    /** */
+    public String CMD_NAME_POSTFIX = "Command";
+
+    /** Command description. */
+    public String description();
+
+    /** @return Arguments class. */
+    public Class<? extends A> argClass();
+
+    /** @return {@code true} if the command is experimental, {@code false} otherwise. */
+    public default boolean experimental() {

Review Comment:
   yes. done.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org