sijie commented on a change in pull request #510: Issue-605 BP-15 New 
CreateLedger API
URL: https://github.com/apache/bookkeeper/pull/510#discussion_r142487828
 
 

 ##########
 File path: 
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerHandle.java
 ##########
 @@ -968,6 +1032,28 @@ public void readLastConfirmedDataComplete(int rc, 
DigestManager.RecoveryData dat
         new TryReadLastConfirmedOp(this, innercb, 
getLastAddConfirmed()).initiate();
     }
 
+    @Override
+    public CompletableFuture<Long> tryReadLastAddConfirmed() {
+        CompletableFuture<Long> counter = new CompletableFuture<>();
+
+        ReadLastConfirmedCallback callback = (int rc, long lastConfirmed, 
Object ctx) -> {
+            SyncCallbackUtils.finish(rc, lastConfirmed, counter);
+        };
+        asyncTryReadLastConfirmed(callback, counter);
+        return counter;
+    }
+
+    @Override
+    public CompletableFuture<Long> readLastAddConfirmed() {
+        CompletableFuture<Long> counter = new CompletableFuture<>();
 
 Review comment:
   change counter?
 
----------------------------------------------------------------
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