ivankelly commented on a change in pull request #755: Issue 750: support 
ByteBuf, ByteBuffer, byte[] in both WriteHandle, WriteAdvHandle, ReadHandle
URL: https://github.com/apache/bookkeeper/pull/755#discussion_r152522328
 
 

 ##########
 File path: 
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/api/WriteHandle.java
 ##########
 @@ -56,6 +57,30 @@
         return append(Unpooled.wrappedBuffer(data));
     }
 
+    /**
+     * Add an entry asynchronously to an open ledger.
+     *
+     * @param data array of bytes to be written.
+     * @return a completable future represents the add result, in case of 
success the future returns the entry id
+     * of this newly appended entry.
+     */
+    default CompletableFuture<Long> append(byte[] data) {
+        return append(Unpooled.wrappedBuffer(data));
+    }
+
+    /**
+     * Add an entry asynchronously to an open ledger.
+     *
+     * @param data array of bytes to be written.
+     * @param offset the offset in the bytes array.
+     * @param length the length of the bytes to be appended.
+     * @return a completable future represents the add result, in case of 
success the future returns the entry id
+     * of this newly appended entry.
 
 Review comment:
   Intent

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to