zookeeper-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [zookeeper] stickyhipp commented on a change in pull request #959: ZOOKEEPER-3402: Add multiRead operation
Date Thu, 13 Jun 2019 00:57:46 GMT
stickyhipp commented on a change in pull request #959: ZOOKEEPER-3402: Add multiRead operation
URL: https://github.com/apache/zookeeper/pull/959#discussion_r293170480
 
 

 ##########
 File path: zookeeper-server/src/main/java/org/apache/zookeeper/OpResult.java
 ##########
 @@ -170,6 +173,67 @@ public int hashCode() {
         }
     }
 
+    /**
+     * A result from a getChildren operation. Provides a list which contains
+     * the names of the children of a given node.
+     */
+    public static class GetChildrenResult extends OpResult {
+        private List<String> children;
+
+        public GetChildrenResult(List<String> children) {
+            super(ZooDefs.OpCode.getChildren);
+            this.children = children;
+        }
+
+        public List<String> getChildren() {
+            return children;
+        }
+
+        @Override
+        public boolean equals(Object o) {
+            if (this == o) return true;
+            if (!(o instanceof GetChildrenResult)) return false;
+
+            GetChildrenResult other = (GetChildrenResult) o;
+            return getType() == other.getType() && children.equals(other.children);
+        }
+
+        @Override
+        public int hashCode() {
+            return getType() * 35 + children.hashCode();
+        }
+    }
+
+    /**
+     * A result from a getData operation. The data is represented as a byte array.
+     */
+    public static class GetDataResult extends OpResult {
+        private byte[] data;
 
 Review comment:
   Add Stat data member
   
   https://github.com/apache/zookeeper/pull/979/files#diff-7845efb4abfbb23b49a833c9042004a8R207

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message