You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2017/11/22 07:33:32 UTC

[GitHub] eolivelli commented on a change in pull request #755: Issue 750: support ByteBuf, ByteBuffer, byte[] in both WriteHandle, WriteAdvHandle, ReadHandle

eolivelli 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_r152485557
 
 

 ##########
 File path: bookkeeper-server/src/main/java/org/apache/bookkeeper/client/api/WriteAdvHandle.java
 ##########
 @@ -45,12 +45,36 @@
      *
      * @param entryId entryId to be added
      * @param data array of bytes to be written
-     * @return an handle to the result, in case of success it will return the same value of param entryId
+     * @return an handle to the result, in case of success it will return the same value of param entryId.
      */
     default CompletableFuture<Long> write(final long entryId, final ByteBuffer data) {
         return write(entryId, Unpooled.wrappedBuffer(data));
     }
 
+    /**
+     * Add entry asynchronously to an open ledger.
+     *
+     * @param entryId entryId to be added.
+     * @param data array of bytes to be written
 
 Review comment:
   should we tell that the array will be processed async and so the caller MUST not chnge the contents of the array ?
   It is not so obvious, a user could think that data is copied or is not used anymore once the method returns.
   Users of BK are advanced developers, but a line of warning maybe would be good
    

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services