All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.rocksdb.SkipListMemTableConfig Maven / Gradle / Ivy

Go to download

RocksDB fat jar that contains .so files for linux64, jnilib files for Mac OSX, and a .dll for Windows x64. It contains the Yamcs merge operator for the Parameter Archive

There is a newer version: 9.4.0.11
Show newest version
// Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
package org.rocksdb;

/**
 * The config for skip-list memtable representation.
 */
public class SkipListMemTableConfig extends MemTableConfig {

  public static final long DEFAULT_LOOKAHEAD = 0;

  /**
   * SkipListMemTableConfig constructor
   */
  public SkipListMemTableConfig() {
    lookahead_ = DEFAULT_LOOKAHEAD;
  }

  /**
   * Sets lookahead for SkipList
   *
   * @param lookahead If non-zero, each iterator's seek operation
   *     will start the search from the previously visited record
   *     (doing at most 'lookahead' steps). This is an
   *     optimization for the access pattern including many
   *     seeks with consecutive keys.
   * @return the current instance of SkipListMemTableConfig
   */
  public SkipListMemTableConfig setLookahead(final long lookahead) {
    lookahead_ = lookahead;
    return this;
  }

  /**
   * Returns the currently set lookahead value.
   *
   * @return lookahead value
   */
  public long lookahead() {
    return lookahead_;
  }


  @Override protected long newMemTableFactoryHandle() {
    return newMemTableFactoryHandle0(lookahead_);
  }

  private static native long newMemTableFactoryHandle0(long lookahead)
      throws IllegalArgumentException;

  private long lookahead_;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy