You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@helix.apache.org by GitBox <gi...@apache.org> on 2023/01/09 17:47:23 UTC

[GitHub] [helix] junkaixue commented on a diff in pull request #2336: Op and OpResult Logic

junkaixue commented on code in PR #2336:
URL: https://github.com/apache/helix/pull/2336#discussion_r1064917483


##########
meta-client/src/main/java/org/apache/helix/metaclient/api/Op.java:
##########
@@ -23,16 +23,96 @@
  *  Represents a single operation in a multi-operation transaction.  Each operation can be a create, set,
  *  version check or delete operation.
  */
-public class Op {
+public abstract class Op {
+  private int type;
+  private String path;
+
+  private Op(int type, String path) {
+    this.type = type;
+    this.path = path;
+  }
+  public static Op create(String path, byte[] data) {
+    return new Create(path, data);

Review Comment:
   A little bit confused there. Is this circular call? Op is the abstract class try to create object for Create, which is super class for Op.
   
   Could you please give more explanation here?
   
   Better we have java doc for those APIs.



-- 
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: reviews-unsubscribe@helix.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org