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_r152699968
 
 

 ##########
 File path: 
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/api/WriteHandle.java
 ##########
 @@ -41,7 +41,8 @@
     /**
      * Add entry asynchronously to an open ledger.
      *
-     * @param data array of bytes to be written
+     * @param data a bytebuf to be written. The bytebuf's reference count will 
be decremented by 1 after the
 
 Review comment:
   In the normal case, the bytebuf will have a refcount of 1. It will be passed 
to append, and then the caller can forget about the bytebuf. In this case, the 
caller is passing ownership of that 1 refcount to the callee.
   If the caller wants to keep a reference, it increments the refcount again. 
In this case, the callee will still own one refcount, and the caller will own 
another.
   
   Not too fussed about this in any case. What's there is fine. Though the 
"completable future is returned" bit is unclear. Is it when the completable 
future completes, or when the append method returns?

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