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_r152520550
 
 

 ##########
 File path: 
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/api/LedgerEntry.java
 ##########
 @@ -55,15 +60,28 @@
     long getLength();
 
     /**
-     * Returns the content of the entry.
+     * Returns the content of the entry into a byte array.
      *
      * @return the content of the entry
      */
     byte[] getEntry();
 
+    /**
+     * Exposes this entry's data as an NIO {@link ByteBuffer}. The returned 
buffer
+     * shares the content with this underneath bytebuf (which you can get it 
by {@link #getEntryBuffer()}),
+     * while changing the position and limit of the returned NIO buffer does 
not affect the indexes and
+     * marks of this underneath buffer.  This method is identical
+     * to {@code entry.getEntryBuffer().nioBuffer()}. This method does not
+     * modify {@code readerIndex} or {@code writerIndex} of the underneath 
bytebuf.
+     */
+    ByteBuffer getNioBuffer();
 
 Review comment:
   getEntryNioBuffer to be consistent?

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