Package org.rocksdb
Class CompactionOptions
java.lang.Object
org.rocksdb.AbstractNativeReference
org.rocksdb.AbstractImmutableNativeReference
org.rocksdb.RocksObject
org.rocksdb.CompactionOptions
- All Implemented Interfaces:
AutoCloseable
CompactionOptions are used in
RocksDB.compactFiles(CompactionOptions, ColumnFamilyHandle, List, int, int, CompactionJobInfo)
calls.-
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 TypeMethodDescriptionGet the compaction output compression type.protected final voiddisposeInternal(long handle) intGet the maximum number of threads that will concurrently perform a compaction job.longGet the compaction output file size limit.setCompression(CompressionType compression) Set the compaction output compression type.setMaxSubcompactions(int maxSubcompactions) This value represents the maximum number of threads that will concurrently perform a compaction job by breaking it into multiple, smaller ones that are run simultaneously.setOutputFileSizeLimit(long outputFileSizeLimit) Compaction will create files of sizeoutputFileSizeLimit().Methods inherited from class org.rocksdb.RocksObject
disposeInternal, getNativeHandleMethods inherited from class org.rocksdb.AbstractImmutableNativeReference
close, disOwnNativeHandle, isOwningHandle
-
Constructor Details
-
CompactionOptions
public CompactionOptions()
-
-
Method Details
-
compression
Get the compaction output compression type. SeesetCompression(CompressionType).- Returns:
- the compression type.
-
setCompression
Set the compaction output compression type. Default: snappy If set toCompressionType.DISABLE_COMPRESSION_OPTION, RocksDB will choose compression type according to theColumnFamilyOptions.compressionType(), taking into account the output level ifColumnFamilyOptions.compressionPerLevel()is specified.- Parameters:
compression- the compression type to use for compaction output.- Returns:
- the instance of the current Options.
-
outputFileSizeLimit
public long outputFileSizeLimit()Get the compaction output file size limit. SeesetOutputFileSizeLimit(long).- Returns:
- the file size limit.
-
setOutputFileSizeLimit
Compaction will create files of sizeoutputFileSizeLimit(). Default: 2^64-1, which means that compaction will create a single file- Parameters:
outputFileSizeLimit- the size limit- Returns:
- the instance of the current Options.
-
maxSubcompactions
public int maxSubcompactions()Get the maximum number of threads that will concurrently perform a compaction job.- Returns:
- the maximum number of threads.
-
setMaxSubcompactions
This value represents the maximum number of threads that will concurrently perform a compaction job by breaking it into multiple, smaller ones that are run simultaneously. Default: 0 (i.e. no subcompactions) If > 0, it will replace the option inDBOptions.maxSubcompactions()for this compaction.- Parameters:
maxSubcompactions- The maximum number of threads that will concurrently perform a compaction job- Returns:
- the instance of the current Options.
-
disposeInternal
protected final void disposeInternal(long handle) - Specified by:
disposeInternalin classRocksObject
-