sijie commented on a change in pull request #788: Issue 787: Client should be 
able to get ledger metadata from Handles.
URL: https://github.com/apache/bookkeeper/pull/788#discussion_r153758250
 
 

 ##########
 File path: 
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/api/Handle.java
 ##########
 @@ -55,6 +55,17 @@ default void close() throws BKException, 
InterruptedException {
         FutureUtils.result(asyncClose());
     }
 
+    /**
+     * Returns the metadata of this ledger.
+     *
+     * <p>This call only retrieves the metadata cached locally. If there is 
any metadata updated, the read
+     * handle will receive the metadata updates and update the metadata 
locally. The metadata notification
+     * can be deplayed, so it is possible you can receive a stale copy of 
ledger metadata from this call.
+     *
+     * @return the metadata of this ledger.
+     */
+    LedgerMetadata getLedgerMetadata();
 
 Review comment:
   there is already a "getLedgerMetadata()" in LedgerHandle. it is easier to 
just provide the same method name. 

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to