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

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

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

origin: apache/pulsar

setLastActive(other.getLastActive());
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

setLastActive(other.getLastActive());
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);
        }
      });
}
org.apache.bookkeeper.mledger.protoMLDataFormats$ManagedCursorInfo$BuildersetLastActive

Javadoc

optional int64 lastActive = 6;

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;
  • setMarkDeleteLedgerId
    Last snapshot of the mark-delete position optional int64 markDeleteLedgerId = 2;
  • <init>
  • addAllIndividualDeletedMessages
    repeated .MessageRange individualDeletedMessages = 4;
  • buildPartial
  • ensureIndividualDeletedMessagesIsMutable
  • getIndividualDeletedMessages
    repeated .MessageRange individualDeletedMessages = 4;
  • getIndividualDeletedMessagesCount
    repeated .MessageRange individualDeletedMessages = 4;
  • getIndividualDeletedMessagesFieldBuilder
  • getParentForChildren
  • getIndividualDeletedMessagesFieldBuilder,
  • getParentForChildren,
  • hasCursorsLedgerId,
  • isClean,
  • maybeForceBuilderInitialization,
  • mergeFrom,
  • mergeUnknownFields,
  • newUninitializedMessageException,
  • onBuilt,
  • onChanged

Popular in Java

  • Reactive rest calls using spring rest template
  • getApplicationContext (Context)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • addToBackStack (FragmentTransaction)
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • String (java.lang)
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • Best plugins for Eclipse
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