Tabnine Logo
MLDataFormats$PositionInfo
Code IndexAdd Tabnine to your IDE (free)

How to use
MLDataFormats$PositionInfo
in
org.apache.bookkeeper.mledger.proto

Best Java code snippets using org.apache.bookkeeper.mledger.proto.MLDataFormats$PositionInfo (Showing top 20 results out of 315)

origin: apache/pulsar

  LedgerEntry entry = seq.nextElement();
  PositionInfo positionInfo;
  positionInfo = PositionInfo.parseFrom(entry.getEntry());
  individualDeletedMessagesCount.set(positionInfo.getIndividualDeletedMessagesCount());
} catch (Exception e) {
origin: apache/pulsar

void persistPositionToLedger(final LedgerHandle lh, MarkDeleteEntry mdEntry, final VoidCallback callback) {
  PositionImpl position = mdEntry.newPosition;
  PositionInfo pi = PositionInfo.newBuilder().setLedgerId(position.getLedgerId())
      .setEntryId(position.getEntryId())
      .addAllIndividualDeletedMessages(buildIndividualDeletedMessageRanges())
  lh.asyncAddEntry(pi.toByteArray(), (rc, lh1, entryId, ctx) -> {
    if (rc == BKException.Code.OK) {
      if (log.isDebugEnabled()) {
origin: apache/pulsar

public org.apache.bookkeeper.mledger.proto.MLDataFormats.PositionInfo buildPartial() {
 org.apache.bookkeeper.mledger.proto.MLDataFormats.PositionInfo result = new org.apache.bookkeeper.mledger.proto.MLDataFormats.PositionInfo(this);
 int from_bitField0_ = bitField0_;
 int to_bitField0_ = 0;
origin: org.apache.pulsar/managed-ledger-original

PositionInfo positionInfo;
try {
  positionInfo = PositionInfo.parseFrom(entry.getEntry());
} catch (InvalidProtocolBufferException e) {
  callback.operationFailed(new ManagedLedgerException(e));
if (positionInfo.getPropertiesCount() > 0) {
  for (int i = 0; i < positionInfo.getPropertiesCount(); i++) {
    LongProperty property = positionInfo.getProperties(i);
    recoveredProperties.put(property.getName(), property.getValue());
if (positionInfo.getIndividualDeletedMessagesCount() > 0) {
  recoverIndividualDeletedMessages(positionInfo.getIndividualDeletedMessagesList());
origin: org.apache.pulsar/managed-ledger-original

public Builder mergeFrom(org.apache.bookkeeper.mledger.proto.MLDataFormats.PositionInfo other) {
 if (other == org.apache.bookkeeper.mledger.proto.MLDataFormats.PositionInfo.getDefaultInstance()) return this;
 if (other.hasLedgerId()) {
  setLedgerId(other.getLedgerId());
 if (other.hasEntryId()) {
  setEntryId(other.getEntryId());
origin: com.yahoo.pulsar/managed-ledger

PositionInfo positionInfo;
try {
  positionInfo = PositionInfo.parseFrom(entry.getEntry());
} catch (InvalidProtocolBufferException e) {
  callback.operationFailed(new ManagedLedgerException(e));
if (positionInfo.getIndividualDeletedMessagesCount() > 0) {
  recoverIndividualDeletedMessages(positionInfo.getIndividualDeletedMessagesList());
origin: org.apache.pulsar/managed-ledger-original

void persistPositionToLedger(final LedgerHandle lh, MarkDeleteEntry mdEntry, final VoidCallback callback) {
  PositionImpl position = mdEntry.newPosition;
  PositionInfo pi = PositionInfo.newBuilder().setLedgerId(position.getLedgerId())
      .setEntryId(position.getEntryId())
      .addAllIndividualDeletedMessages(buildIndividualDeletedMessageRanges())
  lh.asyncAddEntry(pi.toByteArray(), (rc, lh1, entryId, ctx) -> {
    if (rc == BKException.Code.OK) {
      if (log.isDebugEnabled()) {
origin: org.apache.pulsar/managed-ledger-original

public org.apache.bookkeeper.mledger.proto.MLDataFormats.PositionInfo buildPartial() {
 org.apache.bookkeeper.mledger.proto.MLDataFormats.PositionInfo result = new org.apache.bookkeeper.mledger.proto.MLDataFormats.PositionInfo(this);
 int from_bitField0_ = bitField0_;
 int to_bitField0_ = 0;
origin: org.apache.pulsar/managed-ledger-original

  log.debug(" Read entry {} from ledger {} for cursor {}", lastEntry, ledgerId, cursorName);
MLDataFormats.PositionInfo positionInfo = MLDataFormats.PositionInfo.parseFrom(ledgerEntry.getEntry());
lastAckedMessagePosition = new PositionImpl(positionInfo);
if (log.isDebugEnabled()) {
origin: com.yahoo.pulsar/managed-ledger

  log.debug(" Read entry {} from ledger {} for cursor {}", lastEntry, ledgerId, cursorName);
MLDataFormats.PositionInfo positionInfo = MLDataFormats.PositionInfo.parseFrom(ledgerEntry.getEntry());
lastAckedMessagePosition = new PositionImpl(positionInfo);
if (log.isDebugEnabled()) {
origin: com.yahoo.pulsar/managed-ledger

public Builder mergeFrom(org.apache.bookkeeper.mledger.proto.MLDataFormats.PositionInfo other) {
 if (other == org.apache.bookkeeper.mledger.proto.MLDataFormats.PositionInfo.getDefaultInstance()) return this;
 if (other.hasLedgerId()) {
  setLedgerId(other.getLedgerId());
 if (other.hasEntryId()) {
  setEntryId(other.getEntryId());
 this.mergeUnknownFields(other.getUnknownFields());
 return this;
origin: com.yahoo.pulsar/managed-ledger

void persistPosition(final LedgerHandle lh, final PositionImpl position, final VoidCallback callback) {
  PositionInfo pi = PositionInfo.newBuilder()
      .setLedgerId(position.getLedgerId())
      .setEntryId(position.getEntryId())
  lh.asyncAddEntry(pi.toByteArray(), (rc, lh1, entryId, ctx) -> {
    if (rc == BKException.Code.OK) {
      if (log.isDebugEnabled()) {
origin: org.apache.pulsar/managed-ledger-original

public final boolean isInitialized() {
 byte isInitialized = memoizedIsInitialized;
 if (isInitialized == 1) return true;
 if (isInitialized == 0) return false;
 if (!hasLedgerId()) {
  memoizedIsInitialized = 0;
  return false;
 }
 if (!hasEntryId()) {
  memoizedIsInitialized = 0;
  return false;
 }
 for (int i = 0; i < getIndividualDeletedMessagesCount(); i++) {
  if (!getIndividualDeletedMessages(i).isInitialized()) {
   memoizedIsInitialized = 0;
   return false;
  }
 }
 for (int i = 0; i < getPropertiesCount(); i++) {
  if (!getProperties(i).isInitialized()) {
   memoizedIsInitialized = 0;
   return false;
  }
 }
 memoizedIsInitialized = 1;
 return true;
}
origin: org.apache.pulsar/managed-ledger-original

@java.lang.Override
public int hashCode() {
 if (memoizedHashCode != 0) {
  return memoizedHashCode;
 }
 int hash = 41;
 hash = (19 * hash) + getDescriptor().hashCode();
 if (hasLedgerId()) {
  hash = (37 * hash) + LEDGERID_FIELD_NUMBER;
  hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
    getLedgerId());
 }
 if (hasEntryId()) {
  hash = (37 * hash) + ENTRYID_FIELD_NUMBER;
  hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
    getEntryId());
 }
 if (getIndividualDeletedMessagesCount() > 0) {
  hash = (37 * hash) + INDIVIDUALDELETEDMESSAGES_FIELD_NUMBER;
  hash = (53 * hash) + getIndividualDeletedMessagesList().hashCode();
 }
 if (getPropertiesCount() > 0) {
  hash = (37 * hash) + PROPERTIES_FIELD_NUMBER;
  hash = (53 * hash) + getPropertiesList().hashCode();
 }
 hash = (29 * hash) + unknownFields.hashCode();
 memoizedHashCode = hash;
 return hash;
}
origin: org.apache.pulsar/managed-ledger-original

@java.lang.Override
public boolean equals(final java.lang.Object obj) {
 if (obj == this) {
  return true;
 }
 if (!(obj instanceof org.apache.bookkeeper.mledger.proto.MLDataFormats.PositionInfo)) {
  return super.equals(obj);
 }
 org.apache.bookkeeper.mledger.proto.MLDataFormats.PositionInfo other = (org.apache.bookkeeper.mledger.proto.MLDataFormats.PositionInfo) obj;
 boolean result = true;
 result = result && (hasLedgerId() == other.hasLedgerId());
 if (hasLedgerId()) {
  result = result && (getLedgerId()
    == other.getLedgerId());
 }
 result = result && (hasEntryId() == other.hasEntryId());
 if (hasEntryId()) {
  result = result && (getEntryId()
    == other.getEntryId());
 }
 result = result && getIndividualDeletedMessagesList()
   .equals(other.getIndividualDeletedMessagesList());
 result = result && getPropertiesList()
   .equals(other.getPropertiesList());
 result = result && unknownFields.equals(other.unknownFields);
 return result;
}
origin: com.yahoo.pulsar/managed-ledger

public org.apache.bookkeeper.mledger.proto.MLDataFormats.PositionInfo buildPartial() {
 org.apache.bookkeeper.mledger.proto.MLDataFormats.PositionInfo result = new org.apache.bookkeeper.mledger.proto.MLDataFormats.PositionInfo(this);
 int from_bitField0_ = bitField0_;
 int to_bitField0_ = 0;
 if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
  to_bitField0_ |= 0x00000001;
 }
 result.ledgerId_ = ledgerId_;
 if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
  to_bitField0_ |= 0x00000002;
 }
 result.entryId_ = entryId_;
 if (individualDeletedMessagesBuilder_ == null) {
  if (((bitField0_ & 0x00000004) == 0x00000004)) {
   individualDeletedMessages_ = java.util.Collections.unmodifiableList(individualDeletedMessages_);
   bitField0_ = (bitField0_ & ~0x00000004);
  }
  result.individualDeletedMessages_ = individualDeletedMessages_;
 } else {
  result.individualDeletedMessages_ = individualDeletedMessagesBuilder_.build();
 }
 result.bitField0_ = to_bitField0_;
 onBuilt();
 return result;
}

origin: com.yahoo.pulsar/managed-ledger

public final boolean isInitialized() {
 byte isInitialized = memoizedIsInitialized;
 if (isInitialized != -1) return isInitialized == 1;
 
 if (!hasLedgerId()) {
  memoizedIsInitialized = 0;
  return false;
 }
 if (!hasEntryId()) {
  memoizedIsInitialized = 0;
  return false;
 }
 for (int i = 0; i < getIndividualDeletedMessagesCount(); i++) {
  if (!getIndividualDeletedMessages(i).isInitialized()) {
   memoizedIsInitialized = 0;
   return false;
  }
 }
 memoizedIsInitialized = 1;
 return true;
}

origin: org.apache.pulsar/managed-ledger-original

public org.apache.bookkeeper.mledger.proto.MLDataFormats.PositionInfo getDefaultInstanceForType() {
 return org.apache.bookkeeper.mledger.proto.MLDataFormats.PositionInfo.getDefaultInstance();
}
origin: com.yahoo.pulsar/managed-ledger

public org.apache.bookkeeper.mledger.proto.MLDataFormats.PositionInfo getDefaultInstanceForType() {
 return org.apache.bookkeeper.mledger.proto.MLDataFormats.PositionInfo.getDefaultInstance();
}

origin: org.apache.pulsar/managed-ledger-original

public PositionImpl(PositionInfo pi) {
  this.ledgerId = pi.getLedgerId();
  this.entryId = pi.getEntryId();
}
org.apache.bookkeeper.mledger.protoMLDataFormats$PositionInfo

Javadoc

Protobuf type PositionInfo

Most used methods

  • getIndividualDeletedMessagesCount
    repeated .MessageRange individualDeletedMessages = 3;
  • parseFrom
  • toByteArray
  • <init>
  • getDefaultInstance
  • getDescriptor
  • getEntryId
    required int64 entryId = 2;
  • getIndividualDeletedMessages
    repeated .MessageRange individualDeletedMessages = 3;
  • getIndividualDeletedMessagesList
    repeated .MessageRange individualDeletedMessages = 3;
  • getLedgerId
    required int64 ledgerId = 1;
  • hasEntryId
    required int64 entryId = 2;
  • hasLedgerId
    required int64 ledgerId = 1;
  • hasEntryId,
  • hasLedgerId,
  • isInitialized,
  • newBuilder,
  • getProperties,
  • getPropertiesCount,
  • getPropertiesList,
  • getSerializedSize,
  • getUnknownFields,
  • makeExtensionsImmutable

Popular in Java

  • Start an intent from android
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • setContentView (Activity)
  • setRequestProperty (URLConnection)
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now