Package org.rocksdb
Class FlushOptions
- java.lang.Object
-
- org.rocksdb.AbstractNativeReference
-
- org.rocksdb.AbstractImmutableNativeReference
-
- org.rocksdb.RocksObject
-
- org.rocksdb.FlushOptions
-
- All Implemented Interfaces:
java.lang.AutoCloseable
public class FlushOptions extends RocksObject
FlushOptions to be passed to flush operations ofRocksDB.
-
-
Field Summary
-
Fields inherited from class org.rocksdb.RocksObject
nativeHandle_
-
Fields inherited from class org.rocksdb.AbstractImmutableNativeReference
owningHandle_
-
-
Constructor Summary
Constructors Constructor Description FlushOptions()Construct a new instance of FlushOptions.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanallowWriteStall()Returns true if writes are allowed to stall for flushes to complete, false otherwise.protected voiddisposeInternal(long handle)FlushOptionssetAllowWriteStall(boolean allowWriteStall)Set to true so that flush would proceeds immediately even it it means writes will stall for the duration of the flush.FlushOptionssetWaitForFlush(boolean waitForFlush)Set if the flush operation shall block until it terminates.booleanwaitForFlush()Wait for flush to finished.-
Methods inherited from class org.rocksdb.RocksObject
disposeInternal, getNativeHandle
-
Methods inherited from class org.rocksdb.AbstractImmutableNativeReference
close, disOwnNativeHandle, isOwningHandle
-
Methods inherited from class org.rocksdb.AbstractNativeReference
dispose, finalize
-
-
-
-
Method Detail
-
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 proceeds immediately even it 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
-
-