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

org.rocksdb.FlushOptions Maven / Gradle / Ivy

Go to download

RocksDB fat jar to use with Apache Flink that contains .so files for linux32 and linux64, jnilib files for Mac OSX, and a .dll for Windows x64.

There is a newer version: 5.17.2-artisans-2.0
Show newest version
package org.rocksdb;

/**
 * FlushOptions to be passed to flush operations of
 * {@link org.rocksdb.RocksDB}.
 */
public class FlushOptions extends RocksObject {

  /**
   * Construct a new instance of FlushOptions.
   */
  public FlushOptions(){
    super(newFlushOptions());
  }

  /**
   * Set if the flush operation shall block until it terminates.
   *
   * @param waitForFlush boolean value indicating if the flush
   *     operations waits for termination of the flush process.
   *
   * @return instance of current FlushOptions.
   */
  public FlushOptions setWaitForFlush(final boolean waitForFlush) {
    assert(isOwningHandle());
    setWaitForFlush(nativeHandle_, waitForFlush);
    return this;
  }

  /**
   * Wait for flush to finished.
   *
   * @return boolean value indicating if the flush operation
   *     waits for termination of the flush process.
   */
  public boolean waitForFlush() {
    assert(isOwningHandle());
    return waitForFlush(nativeHandle_);
  }

  private native static long newFlushOptions();
  @Override protected final native void disposeInternal(final long handle);
  private native void setWaitForFlush(long handle,
      boolean wait);
  private native boolean waitForFlush(long handle);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy