vldpyatkov commented on code in PR #1411:
URL: https://github.com/apache/ignite-3/pull/1411#discussion_r1043193784


##########
modules/raft/src/testFixtures/java/org/apache/ignite/raft/server/counter/IncrementAndGetCommand.java:
##########
@@ -18,29 +18,22 @@
 package org.apache.ignite.raft.server.counter;
 
 import org.apache.ignite.internal.raft.WriteCommand;
+import org.apache.ignite.network.annotations.Transferable;
+import org.apache.ignite.raft.messages.TestMessageGroup;
+import org.apache.ignite.raft.messages.TestRaftMessagesFactory;
 
 /**
  * Increment and get command.
  */
-public class IncrementAndGetCommand implements WriteCommand {
-    /**
-     * The delta.
-     */
-    private final long delta;
-
-    /**
-     * Constructor.
-     *
-     * @param delta The delta.
-     */
-    public IncrementAndGetCommand(long delta) {
-        this.delta = delta;
-    }
-
+//TODO Move to integration test directory when Maven build is not supported 
anymore.
+@Transferable(TestMessageGroup.INCREMENT_AND_GET_COMMAND)
+public interface IncrementAndGetCommand extends WriteCommand {
     /**
      * Returns the delta.
      */
-    public long delta() {
-        return delta;
+    long delta();
+
+    static IncrementAndGetCommand incrementAndGetCommand(long delta) {

Review Comment:
   Why do you use a static method to create an instance, if there is a factory?
   This looks like contradictory patterns to me.



##########
modules/raft/src/testFixtures/java/org/apache/ignite/raft/server/counter/IncrementAndGetCommand.java:
##########
@@ -18,29 +18,22 @@
 package org.apache.ignite.raft.server.counter;
 
 import org.apache.ignite.internal.raft.WriteCommand;
+import org.apache.ignite.network.annotations.Transferable;
+import org.apache.ignite.raft.messages.TestMessageGroup;
+import org.apache.ignite.raft.messages.TestRaftMessagesFactory;
 
 /**
  * Increment and get command.
  */
-public class IncrementAndGetCommand implements WriteCommand {
-    /**
-     * The delta.
-     */
-    private final long delta;
-
-    /**
-     * Constructor.
-     *
-     * @param delta The delta.
-     */
-    public IncrementAndGetCommand(long delta) {
-        this.delta = delta;
-    }
-
+//TODO Move to integration test directory when Maven build is not supported 
anymore.

Review Comment:
   There is "todo" without a ticket number.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to