Package org.rocksdb
Class FlushOptions
java.lang.Object
org.rocksdb.AbstractNativeReference
org.rocksdb.AbstractImmutableNativeReference
org.rocksdb.RocksObject
org.rocksdb.FlushOptions
- All Implemented Interfaces:
AutoCloseable
FlushOptions to be passed to flush operations of
RocksDB.-
Field Summary
Fields inherited from class org.rocksdb.RocksObject
nativeHandle_Fields inherited from class org.rocksdb.AbstractImmutableNativeReference
owningHandle_ -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns true if writes are allowed to stall for flushes to complete, false otherwise.protected final voiddisposeInternal(long handle) 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.setWaitForFlush(boolean waitForFlush) Set if the flush operation shall block until it terminates.booleanWait for flush to finished.Methods inherited from class org.rocksdb.RocksObject
disposeInternal, getNativeHandleMethods inherited from class org.rocksdb.AbstractImmutableNativeReference
close, disOwnNativeHandle, isOwningHandle
-
Constructor Details
-
FlushOptions
public FlushOptions()Construct a new instance of FlushOptions.
-
-
Method Details
-
setWaitForFlush
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
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:
disposeInternalin classRocksObject
-