Package org.rocksdb
Class CompactionOptionsFIFO
- java.lang.Object
-
- org.rocksdb.AbstractNativeReference
-
- org.rocksdb.AbstractImmutableNativeReference
-
- org.rocksdb.RocksObject
-
- org.rocksdb.CompactionOptionsFIFO
-
- All Implemented Interfaces:
java.lang.AutoCloseable
public class CompactionOptionsFIFO extends RocksObject
Options for FIFO Compaction
-
-
Field Summary
-
Fields inherited from class org.rocksdb.RocksObject
nativeHandle_
-
Fields inherited from class org.rocksdb.AbstractImmutableNativeReference
owningHandle_
-
-
Constructor Summary
Constructors Constructor Description CompactionOptionsFIFO()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanallowCompaction()Check if intra-L0 compaction is enabled.protected voiddisposeInternal(long handle)longmaxTableFilesSize()Once the total sum of table files reaches this, we will delete the oldest table file Default: 1GBCompactionOptionsFIFOsetAllowCompaction(boolean allowCompaction)If true, try to do compaction to compact smaller files into larger ones.CompactionOptionsFIFOsetMaxTableFilesSize(long maxTableFilesSize)Once the total sum of table files reaches this, we will delete the oldest table file Default: 1GB-
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
-
setMaxTableFilesSize
public CompactionOptionsFIFO setMaxTableFilesSize(long maxTableFilesSize)
Once the total sum of table files reaches this, we will delete the oldest table file Default: 1GB- Parameters:
maxTableFilesSize- The maximum size of the table files- Returns:
- the reference to the current options.
-
maxTableFilesSize
public long maxTableFilesSize()
Once the total sum of table files reaches this, we will delete the oldest table file Default: 1GB- Returns:
- max table file size in bytes
-
setAllowCompaction
public CompactionOptionsFIFO setAllowCompaction(boolean allowCompaction)
If true, try to do compaction to compact smaller files into larger ones. Minimum files to compact follows options.level0_file_num_compaction_trigger and compaction won't trigger if average compact bytes per del file is larger than options.write_buffer_size. This is to protect large files from being compacted again. Default: false- Parameters:
allowCompaction- true to allow intra-L0 compaction- Returns:
- the reference to the current options.
-
allowCompaction
public boolean allowCompaction()
Check if intra-L0 compaction is enabled. When enabled, we try to compact smaller files into larger ones. SeesetAllowCompaction(boolean). Default: false- Returns:
- true if intra-L0 compaction is enabled, false otherwise.
-
disposeInternal
protected final void disposeInternal(long handle)
- Specified by:
disposeInternalin classRocksObject
-
-