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

org.rocksdb.VectorMemTableConfig 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 vector memtable representation.
 */
public class VectorMemTableConfig extends MemTableConfig {
  public static final int DEFAULT_RESERVED_SIZE = 0;

  /**
   * VectorMemTableConfig constructor
   */
  public VectorMemTableConfig() {
    reservedSize_ = DEFAULT_RESERVED_SIZE;
  }

  /**
   * Set the initial size of the vector that will be used
   * by the memtable created based on this config.
   *
   * @param size the initial size of the vector.
   * @return the reference to the current config.
   */
  public VectorMemTableConfig setReservedSize(final int size) {
    reservedSize_ = size;
    return this;
  }

  /**
   * Returns the initial size of the vector used by the memtable
   * created based on this config.
   *
   * @return the initial size of the vector.
   */
  public int reservedSize() {
    return reservedSize_;
  }

  @Override protected long newMemTableFactoryHandle() {
    return newMemTableFactoryHandle(reservedSize_);
  }

  private static native long newMemTableFactoryHandle(long reservedSize)
      throws IllegalArgumentException;
  private int reservedSize_;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy