ivankelly commented on a change in pull request #786: Issue 765: Add 
`isSealed()` to ReadHandle
URL: https://github.com/apache/bookkeeper/pull/786#discussion_r153732470
 
 

 ##########
 File path: 
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/api/ReadHandle.java
 ##########
 @@ -115,6 +115,20 @@
      */
     long getLength();
 
+    /**
+     * Returns whether the ledger is sealed or not.
+     *
+     * <p>A ledger is sealed when either the client explicitly closes it 
({@link WriteHandle#close()} or
+     * {@link WriteAdvHandle#close()}) or another client explicitly open and 
recovery it
+     * {@link OpenBuilder#withRecovery(boolean)}.
+     *
+     * <p>This method only checks the metadata cached locally. The metadata 
can be not update-to-date because
+     * the metadata notification is delayed.
+     *
+     * @return true if the ledger is sealed, otherwise false.
+     */
+    boolean isSealed();
 
 Review comment:
   If we don't rename the operation that seals the ledger, we shouldn't leave 
this as isClosed().

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