sijie commented on a change in pull request #738: Issue 731: refine LedgerEntry 
interface and implementation
URL: https://github.com/apache/bookkeeper/pull/738#discussion_r152513783
 
 

 ##########
 File path: 
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/api/LedgerEntry.java
 ##########
 @@ -56,25 +55,31 @@
     long getLength();
 
     /**
-     * Returns the content of the entry. This method can be called only once. 
While using v2 wire protocol this method
-     * will automatically release the internal ByteBuf.
+     * Returns the content of the entry.
      *
      * @return the content of the entry
-     * @throws IllegalStateException if this method is called twice
      */
     byte[] getEntry();
 
     /**
 
 Review comment:
   @ivankelly - This call doesn't retain any reference of the underneath 
bytebuf. if a caller releases the entry by #close(), it will release the 
underneath bytebuf. If the caller want to use the bytebuf beyond the lifecycle 
of this entry, it has to retain the buf by itself and then be responsible for 
releasing its retained refcnt. I have improved the comment in my subsequent 
change at #755 . 
   
   https://github.com/apache/bookkeeper/pull/755/files

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