@Override public CompletableFuture<Long> readLastAddConfirmedAsync() { return readHandle.readLastAddConfirmedAsync(); }
.withDigestType(config.getDigestType()).withPassword(config.getPassword()).execute() .thenAccept(readHandle -> { readHandle.readLastAddConfirmedAsync().thenAccept(lastAddConfirmed -> { LedgerInfo info = LedgerInfo.newBuilder().setLedgerId(lastLedgerId) .setEntries(lastAddConfirmed + 1).setSize(readHandle.getLength())
/** * Obtains asynchronously the last confirmed write from a quorum of bookies. * * @return the result of the operation * @see #readLastAddConfirmedAsync() */ default long readLastAddConfirmed() throws BKException, InterruptedException { return FutureUtils.<Long, BKException>result(readLastAddConfirmedAsync(), BKException.HANDLER); }
.withDigestType(config.getDigestType()).withPassword(config.getPassword()).execute() .thenAccept(readHandle -> { readHandle.readLastAddConfirmedAsync().thenAccept(lastAddConfirmed -> { LedgerInfo info = LedgerInfo.newBuilder().setLedgerId(lastLedgerId) .setEntries(lastAddConfirmed + 1).setSize(readHandle.getLength())