public class DefaultConfigurableOptionsFactory extends Object implements ConfigurableRocksDBOptionsFactory
ConfigurableRocksDBOptionsFactory
using options provided by RocksDBConfigurableOptions
. It acts as the default options factory within EmbeddedRocksDBStateBackend
if the user did not define a RocksDBOptionsFactory
.Constructor and Description |
---|
DefaultConfigurableOptionsFactory() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
createNativeMetricsOptions, createReadOptions, createWriteOptions
public org.rocksdb.DBOptions createDBOptions(org.rocksdb.DBOptions currentOptions, Collection<AutoCloseable> handlesToClose)
RocksDBOptionsFactory
It is important to set the options on the current object and return the result from the setter methods, otherwise the pre-defined options may get lost.
createDBOptions
in interface RocksDBOptionsFactory
currentOptions
- The options object with the pre-defined options.handlesToClose
- The collection to register newly created RocksObject
s.public org.rocksdb.ColumnFamilyOptions createColumnOptions(org.rocksdb.ColumnFamilyOptions currentOptions, Collection<AutoCloseable> handlesToClose)
RocksDBOptionsFactory
It is important to set the options on the current object and return the result from the setter methods, otherwise the pre-defined options may get lost.
createColumnOptions
in interface RocksDBOptionsFactory
currentOptions
- The options object with the pre-defined options.handlesToClose
- The collection to register newly created RocksObject
s.public DefaultConfigurableOptionsFactory setMaxBackgroundThreads(int totalThreadCount)
public DefaultConfigurableOptionsFactory setMaxOpenFiles(int maxOpenFiles)
public DefaultConfigurableOptionsFactory setLogLevel(org.rocksdb.InfoLogLevel logLevel)
public DefaultConfigurableOptionsFactory setCompactionStyle(org.rocksdb.CompactionStyle compactionStyle)
public DefaultConfigurableOptionsFactory setUseDynamicLevelSize(boolean value)
public DefaultConfigurableOptionsFactory setTargetFileSizeBase(String targetFileSizeBase)
public DefaultConfigurableOptionsFactory setMaxSizeLevelBase(String maxSizeLevelBase)
public DefaultConfigurableOptionsFactory setWriteBufferSize(String writeBufferSize)
public DefaultConfigurableOptionsFactory setMaxWriteBufferNumber(int writeBufferNumber)
public DefaultConfigurableOptionsFactory setMinWriteBufferNumberToMerge(int writeBufferNumber)
public DefaultConfigurableOptionsFactory setBlockSize(String blockSize)
public DefaultConfigurableOptionsFactory setMetadataBlockSize(String metadataBlockSize)
public DefaultConfigurableOptionsFactory setBlockCacheSize(String blockCacheSize)
public DefaultConfigurableOptionsFactory configure(ReadableConfig configuration)
DefaultConfigurableOptionsFactory
instance from a ReadableConfig
.
If no options within RocksDBConfigurableOptions
has ever been configured, the
created RocksDBOptionsFactory would not override anything defined in PredefinedOptions
.
configure
in interface ConfigurableRocksDBOptionsFactory
configuration
- Configuration to be used for the ConfigurableRocksDBOptionsFactory
creationCopyright © 2014–2022 The Apache Software Foundation. All rights reserved.