Tabnine Logo
BTreeIndex.builder
Code IndexAdd Tabnine to your IDE (free)

How to use
builder
method
in
io.pravega.common.util.btree.BTreeIndex

Best Java code snippets using io.pravega.common.util.btree.BTreeIndex.builder (Showing top 2 results out of 315)

origin: pravega/pravega

/**
 * Creates a new instance of the SegmentAttributeIndex class.
 *
 * @param segmentMetadata The SegmentMetadata of the Segment whose attributes we want to manage.
 * @param storage         A Storage adapter which can be used to access the Attribute Segment.
 * @param cache           The Cache to use.
 * @param config          Attribute Index Configuration.
 * @param executor        An Executor to run async tasks.
 */
SegmentAttributeBTreeIndex(@NonNull SegmentMetadata segmentMetadata, @NonNull Storage storage, @NonNull Cache cache,
              @NonNull AttributeIndexConfig config, @NonNull ScheduledExecutorService executor) {
  this.segmentMetadata = segmentMetadata;
  this.storage = storage;
  this.cache = cache;
  this.config = config;
  this.executor = executor;
  this.handle = new AtomicReference<>();
  this.index = BTreeIndex.builder()
              .keyLength(KEY_LENGTH)
              .valueLength(VALUE_LENGTH)
              .maxPageSize(this.config.getMaxIndexPageSize())
              .executor(this.executor)
              .getLength(this::getLength)
              .readPage(this::readPage)
              .writePages(this::writePages)
              .build();
  this.cacheEntries = new HashMap<>();
  this.traceObjectId = String.format("AttributeIndex[%s]", this.segmentMetadata.getId());
  this.closed = new AtomicBoolean();
}
origin: pravega/pravega

private BTreeIndex.BTreeIndexBuilder defaultBuilder(DataSource ds) {
  return BTreeIndex.builder()
      .maxPageSize(MAX_PAGE_SIZE)
      .keyLength(KEY_LENGTH)
      .valueLength(VALUE_LENGTH)
      .readPage(ds::read)
      .writePages(ds::write)
      .getLength(ds::getLength)
      .executor(executorService());
}
io.pravega.common.util.btreeBTreeIndexbuilder

Popular methods of BTreeIndex

  • get
    Looks up the value of multiple keys.
  • initialize
    Initializes the BTreeIndex by fetching metadata from the external data source. This method must be i
  • isInitialized
    Gets a value indicating whether this BTreeIndex instance is initialized or not.
  • iterator
    Returns an AsyncIterator that will iterate through all the keys within the specified bounds. All ite
  • update
    Inserts, updates or removes the given Page Entries into the index. If PageEntry#getValue() is null,
  • applyUpdates
    Executes the given updates on the index. Loads up any necessary BTreePage instances in memory but do
  • calculateMinOffset
    Calculates the Minimum Page Offset for this PageWrapper. The Minimum Page Offset is the smallest of
  • createEmptyIndexPage
  • createEmptyLeafPage
  • deserializePointer
  • deserializePointerMinOffset
  • ensureInitialized
  • deserializePointerMinOffset,
  • ensureInitialized,
  • fetchPage,
  • generateMinKey,
  • getFooter,
  • getFooterOffset,
  • getIndexLength,
  • getPagePointer,
  • getRootPageLength

Popular in Java

  • Running tasks concurrently on multiple threads
  • getResourceAsStream (ClassLoader)
  • getApplicationContext (Context)
  • findViewById (Activity)
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • 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