Examples of readLastConfirmed()


Examples of org.apache.bookkeeper.client.LedgerHandle.readLastConfirmed()

     *            Ledger range to set lastConfirmed entry
     */
    LedgerRange refreshLastLedgerRange(MessageSeqId lastSeqId, LedgerRange oldRange)
        throws BKException, KeeperException, InterruptedException {
        LedgerHandle lh = bk.openLedgerNoRecovery(oldRange.getLedgerId(), DigestType.CRC32, passwd);
        long lastConfirmed = lh.readLastConfirmed();
        MessageSeqId newSeqId = MessageSeqId.newBuilder().mergeFrom(lastSeqId)
                                .setLocalComponent(lastSeqId.getLocalComponent() + lastConfirmed).build();
        return LedgerRange.newBuilder().mergeFrom(oldRange).setEndSeqIdIncluded(newSeqId).build();
    }

View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.