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

org.forstdb.ConfigOptions Maven / Gradle / Ivy

Go to download

ForSt fat jar with modifications specific for Apache Flink that contains .so files for linux32 and linux64 (glibc and musl-libc), jnilib files for Mac OSX, and a .dll for Windows x64.

There is a newer version: 0.1.2-beta
Show newest version
//  Copyright (c) Meta Platforms, Inc. and affiliates.
//
//  This source code is licensed under both the GPLv2 (found in the
//  COPYING file in the root directory) and Apache 2.0 License
//  (found in the LICENSE.Apache file in the root directory).

package org.forstdb;

public class ConfigOptions extends RocksObject {
  /**
   * Construct with default Options
   */
  public ConfigOptions() {
    super(newConfigOptionsInstance());
  }

  public ConfigOptions setDelimiter(final String delimiter) {
    setDelimiter(nativeHandle_, delimiter);
    return this;
  }
  public ConfigOptions setIgnoreUnknownOptions(final boolean ignore) {
    setIgnoreUnknownOptions(nativeHandle_, ignore);
    return this;
  }

  public ConfigOptions setEnv(final Env env) {
    setEnv(nativeHandle_, env.nativeHandle_);
    return this;
  }

  public ConfigOptions setInputStringsEscaped(final boolean escaped) {
    setInputStringsEscaped(nativeHandle_, escaped);
    return this;
  }

  public ConfigOptions setSanityLevel(final SanityLevel level) {
    setSanityLevel(nativeHandle_, level.getValue());
    return this;
  }

  @Override protected final native void disposeInternal(final long handle);

  private static long newConfigOptionsInstance() {
    RocksDB.loadLibrary();
    return newConfigOptions();
  }
  private static native long newConfigOptions();
  private static native void setEnv(final long handle, final long envHandle);
  private static native void setDelimiter(final long handle, final String delimiter);
  private static native void setIgnoreUnknownOptions(final long handle, final boolean ignore);
  private static native void setInputStringsEscaped(final long handle, final boolean escaped);
  private static native void setSanityLevel(final long handle, final byte level);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy