Package org.rocksdb

Class FlushOptions

All Implemented Interfaces:
AutoCloseable

public class FlushOptions extends RocksObject
FlushOptions to be passed to flush operations of RocksDB.
  • Constructor Details

    • FlushOptions

      public FlushOptions()
      Construct a new instance of FlushOptions.
  • Method Details

    • setWaitForFlush

      public FlushOptions setWaitForFlush(boolean waitForFlush)
      Set if the flush operation shall block until it terminates.
      Parameters:
      waitForFlush - boolean value indicating if the flush operations waits for termination of the flush process.
      Returns:
      instance of current FlushOptions.
    • waitForFlush

      public boolean waitForFlush()
      Wait for flush to finished.
      Returns:
      boolean value indicating if the flush operation waits for termination of the flush process.
    • setAllowWriteStall

      public FlushOptions setAllowWriteStall(boolean allowWriteStall)
      Set to true so that flush would proceed immediately even if it means writes will stall for the duration of the flush.

      Set to false so that the operation will wait until it's possible to do the flush without causing stall or until required flush is performed by someone else (foreground call or background thread).

      Default: false

      Parameters:
      allowWriteStall - true to allow writes to stall for flush, false otherwise.
      Returns:
      instance of current FlushOptions.
    • allowWriteStall

      public boolean allowWriteStall()
      Returns true if writes are allowed to stall for flushes to complete, false otherwise.
      Returns:
      true if writes are allowed to stall for flushes
    • disposeInternal

      protected final void disposeInternal(long handle)
      Specified by:
      disposeInternal in class RocksObject