readHandle.readLastAddConfirmedAsync().thenAccept(lastAddConfirmed -> { LedgerInfo info = LedgerInfo.newBuilder().setLedgerId(lastLedgerId) .setEntries(lastAddConfirmed + 1).setSize(readHandle.getLength()) .setTimestamp(clock.millis()).build(); ledgers.put(lastLedgerId, info); .setEntries(0).setSize(0).setTimestamp(clock.millis()).build(); ledgers.put(lastLedgerId, info); future.complete(createReadOnlyCursor(startPosition)); .setSize(0).setTimestamp(clock.millis()).build(); ledgers.put(lastLedgerId, info); future.complete(createReadOnlyCursor(startPosition));
.setEntries(lh.getLastAddConfirmed() + 1).setSize(lh.getLength()) .setTimestamp(clock.millis()).build(); ledgers.put(id, info);
.setSize(lh.getLength()).setTimestamp(clock.millis()).build(); ledgers.put(lh.getId(), info); } else {
readHandle.readLastAddConfirmedAsync().thenAccept(lastAddConfirmed -> { LedgerInfo info = LedgerInfo.newBuilder().setLedgerId(lastLedgerId) .setEntries(lastAddConfirmed + 1).setSize(readHandle.getLength()) .setTimestamp(clock.millis()).build(); ledgers.put(lastLedgerId, info); .setEntries(0).setSize(0).setTimestamp(clock.millis()).build(); ledgers.put(lastLedgerId, info); future.complete(createReadOnlyCursor(startPosition)); .setSize(0).setTimestamp(clock.millis()).build(); ledgers.put(lastLedgerId, info); future.complete(createReadOnlyCursor(startPosition));
.setEntries(lh.getLastAddConfirmed() + 1).setSize(lh.getLength()) .setTimestamp(clock.millis()).build(); ledgers.put(id, info);
.setEntries(lh.getLastAddConfirmed() + 1).setSize(lh.getLength()) .setTimestamp(System.currentTimeMillis()).build(); ledgers.put(id, info);
.setSize(lh.getLength()).setTimestamp(clock.millis()).build(); ledgers.put(lh.getId(), info); } else {
.setSize(lh.getLength()).setTimestamp(System.currentTimeMillis()).build(); ledgers.put(lh.getId(), info); } else {
public Builder mergeFrom(org.apache.bookkeeper.mledger.proto.MLDataFormats.ManagedLedgerInfo.LedgerInfo other) { if (other == org.apache.bookkeeper.mledger.proto.MLDataFormats.ManagedLedgerInfo.LedgerInfo.getDefaultInstance()) return this; if (other.hasLedgerId()) { setLedgerId(other.getLedgerId()); } if (other.hasEntries()) { setEntries(other.getEntries()); } if (other.hasSize()) { setSize(other.getSize()); } if (other.hasTimestamp()) { setTimestamp(other.getTimestamp()); } if (other.hasOffloadContext()) { mergeOffloadContext(other.getOffloadContext()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
public Builder mergeFrom(org.apache.bookkeeper.mledger.proto.MLDataFormats.ManagedLedgerInfo.LedgerInfo other) { if (other == org.apache.bookkeeper.mledger.proto.MLDataFormats.ManagedLedgerInfo.LedgerInfo.getDefaultInstance()) return this; if (other.hasLedgerId()) { setLedgerId(other.getLedgerId()); } if (other.hasEntries()) { setEntries(other.getEntries()); } if (other.hasSize()) { setSize(other.getSize()); } if (other.hasTimestamp()) { setTimestamp(other.getTimestamp()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
Map<Long, LedgerInfo> ledgers = (Map<Long,LedgerInfo>)ledgersField.get(ledger); ledgers.put(secondLedgerId, ledgers.get(secondLedgerId).toBuilder().setEntries(0).setSize(0).build());
public Builder mergeFrom(org.apache.bookkeeper.mledger.proto.MLDataFormats.ManagedLedgerInfo.LedgerInfo other) { if (other == org.apache.bookkeeper.mledger.proto.MLDataFormats.ManagedLedgerInfo.LedgerInfo.getDefaultInstance()) return this; if (other.hasLedgerId()) { setLedgerId(other.getLedgerId()); } if (other.hasEntries()) { setEntries(other.getEntries()); } if (other.hasSize()) { setSize(other.getSize()); } if (other.hasTimestamp()) { setTimestamp(other.getTimestamp()); } if (other.hasOffloadContext()) { mergeOffloadContext(other.getOffloadContext()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }