Tabnine Logo
MLDataFormats$ManagedCursorInfo$Builder.setMarkDeleteLedgerId
Code IndexAdd Tabnine to your IDE (free)

How to use
setMarkDeleteLedgerId
method
in
org.apache.bookkeeper.mledger.proto.MLDataFormats$ManagedCursorInfo$Builder

Best Java code snippets using org.apache.bookkeeper.mledger.proto.MLDataFormats$ManagedCursorInfo$Builder.setMarkDeleteLedgerId (Showing top 7 results out of 315)

origin: apache/pulsar

setMarkDeleteLedgerId(other.getMarkDeleteLedgerId());
origin: apache/pulsar

  public Object answer(InvocationOnMock invocation) {
    ManagedCursorInfo info = ManagedCursorInfo.newBuilder().setCursorsLedgerId(cursorsLedgerId)
        .setMarkDeleteLedgerId(markDeleteLedgerId).setMarkDeleteEntryId(markDeleteEntryId)
        .setLastActive(0L).build();
    Stat stat = mock(Stat.class);
    MetaStoreCallback<ManagedCursorInfo> callback = (MetaStoreCallback<ManagedCursorInfo>) invocation
        .getArguments()[2];
    callback.operationComplete(info, stat);
    return null;
  }
}).when(mockMetaStore).asyncGetCursorInfo(eq(mlName), eq(cursorName), any(MetaStoreCallback.class));
origin: apache/pulsar

private void persistPositionMetaStore(long cursorsLedgerId, PositionImpl position, Map<String, Long> properties,
    MetaStoreCallback<Void> callback, boolean persistIndividualDeletedMessageRanges) {
  // When closing we store the last mark-delete position in the z-node itself, so we won't need the cursor ledger,
  // hence we write it as -1. The cursor ledger is deleted once the z-node write is confirmed.
  ManagedCursorInfo.Builder info = ManagedCursorInfo.newBuilder() //
      .setCursorsLedgerId(cursorsLedgerId) //
      .setMarkDeleteLedgerId(position.getLedgerId()) //
      .setMarkDeleteEntryId(position.getEntryId()) //
      .setLastActive(lastActive); //
  info.addAllProperties(buildPropertiesMap(properties));
  if (persistIndividualDeletedMessageRanges) {
    info.addAllIndividualDeletedMessages(buildIndividualDeletedMessageRanges());
  }
  if (log.isDebugEnabled()) {
    log.debug("[{}][{}]  Closing cursor at md-position: {}", ledger.getName(), name, position);
  }
  ledger.getStore().asyncUpdateCursorInfo(ledger.getName(), name, info.build(), cursorLedgerStat,
      new MetaStoreCallback<Void>() {
        @Override
        public void operationComplete(Void result, Stat stat) {
          cursorLedgerStat = stat;
          callback.operationComplete(result, stat);
        }
        @Override
        public void operationFailed(MetaStoreException e) {
          callback.operationFailed(e);
        }
      });
}
origin: org.apache.pulsar/managed-ledger-original

setMarkDeleteLedgerId(other.getMarkDeleteLedgerId());
origin: com.yahoo.pulsar/managed-ledger

setMarkDeleteLedgerId(other.getMarkDeleteLedgerId());
origin: org.apache.pulsar/managed-ledger-original

private void persistPositionMetaStore(long cursorsLedgerId, PositionImpl position, Map<String, Long> properties,
    MetaStoreCallback<Void> callback, boolean persistIndividualDeletedMessageRanges) {
  // When closing we store the last mark-delete position in the z-node itself, so we won't need the cursor ledger,
  // hence we write it as -1. The cursor ledger is deleted once the z-node write is confirmed.
  ManagedCursorInfo.Builder info = ManagedCursorInfo.newBuilder() //
      .setCursorsLedgerId(cursorsLedgerId) //
      .setMarkDeleteLedgerId(position.getLedgerId()) //
      .setMarkDeleteEntryId(position.getEntryId()) //
      .setLastActive(lastActive); //
  info.addAllProperties(buildPropertiesMap(properties));
  if (persistIndividualDeletedMessageRanges) {
    info.addAllIndividualDeletedMessages(buildIndividualDeletedMessageRanges());
  }
  if (log.isDebugEnabled()) {
    log.debug("[{}][{}]  Closing cursor at md-position: {}", ledger.getName(), name, position);
  }
  ledger.getStore().asyncUpdateCursorInfo(ledger.getName(), name, info.build(), cursorLedgerStat,
      new MetaStoreCallback<Void>() {
        @Override
        public void operationComplete(Void result, Stat stat) {
          cursorLedgerStat = stat;
          callback.operationComplete(result, stat);
        }
        @Override
        public void operationFailed(MetaStoreException e) {
          callback.operationFailed(e);
        }
      });
}
origin: com.yahoo.pulsar/managed-ledger

private void persistPositionMetaStore(long cursorsLedgerId, PositionImpl position,
    MetaStoreCallback<Void> callback) {
  // When closing we store the last mark-delete position in the z-node itself, so we won't need the cursor ledger,
  // hence we write it as -1. The cursor ledger is deleted once the z-node write is confirmed.
  ManagedCursorInfo.Builder info = ManagedCursorInfo.newBuilder() //
      .setCursorsLedgerId(cursorsLedgerId) //
      .setMarkDeleteLedgerId(position.getLedgerId()) //
      .setMarkDeleteEntryId(position.getEntryId()); //
  if (protobufFormat == ZNodeProtobufFormat.Binary) {
    info.addAllIndividualDeletedMessages(buildIndividualDeletedMessageRanges());
  }
  if (log.isDebugEnabled()) {
    log.debug("[{}][{}]  Closing cursor at md-position: {}", ledger.getName(), name, markDeletePosition);
  }
  ledger.getStore().asyncUpdateCursorInfo(ledger.getName(), name, info.build(), cursorLedgerStat,
      new MetaStoreCallback<Void>() {
        @Override
        public void operationComplete(Void result, Stat stat) {
          callback.operationComplete(result, stat);
        }
        @Override
        public void operationFailed(MetaStoreException e) {
          callback.operationFailed(e);
        }
      });
}
org.apache.bookkeeper.mledger.protoMLDataFormats$ManagedCursorInfo$BuildersetMarkDeleteLedgerId

Javadoc

 
Last snapshot of the mark-delete position 
optional int64 markDeleteLedgerId = 2;

Popular methods of MLDataFormats$ManagedCursorInfo$Builder

  • build
  • setCursorsLedgerId
    If the ledger id is -1, then the mark-delete position is the one from the (ledgerId, entryId) sna
  • setMarkDeleteEntryId
    optional int64 markDeleteEntryId = 3;
  • <init>
  • addAllIndividualDeletedMessages
    repeated .MessageRange individualDeletedMessages = 4;
  • buildPartial
  • ensureIndividualDeletedMessagesIsMutable
  • getIndividualDeletedMessages
    repeated .MessageRange individualDeletedMessages = 4;
  • getIndividualDeletedMessagesCount
    repeated .MessageRange individualDeletedMessages = 4;
  • getIndividualDeletedMessagesFieldBuilder
  • getParentForChildren
  • hasCursorsLedgerId
    If the ledger id is -1, then the mark-delete position is the one from the (ledgerId, entryId) sna
  • getParentForChildren,
  • hasCursorsLedgerId,
  • isClean,
  • maybeForceBuilderInitialization,
  • mergeFrom,
  • mergeUnknownFields,
  • newUninitializedMessageException,
  • onBuilt,
  • onChanged

Popular in Java

  • Start an intent from android
  • getSupportFragmentManager (FragmentActivity)
  • onRequestPermissionsResult (Fragment)
  • onCreateOptionsMenu (Activity)
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • JLabel (javax.swing)
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • Github Copilot alternatives
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