public class Options extends RocksObject implements DBOptionsInterface, ColumnFamilyOptionsInterface
RocksDB
(i.e., RocksDB.open()).
If RocksObject.dispose()
function is not called, then it will be GC'd automatically
and native resources will be released as part of the process.nativeHandle_
DEFAULT_COMPACTION_MEMTABLE_MEMORY_BUDGET
Constructor and Description |
---|
Options()
Construct options for opening a RocksDB.
|
Modifier and Type | Method and Description |
---|---|
boolean |
adviseRandomOnOpen()
If set true, will hint the underlying file system that the file
access pattern is random, when a sst file is opened.
|
boolean |
allowMmapReads()
Allow the OS to mmap file for reading sst tables.
|
boolean |
allowMmapWrites()
Allow the OS to mmap file for writing.
|
boolean |
allowOsBuffer()
Data being read from file storage may be buffered in the OS
Default: true
|
long |
arenaBlockSize()
The size of one block in arena memory allocation.
|
int |
bloomLocality()
Control locality of bloom filter probes to improve cache miss rate.
|
long |
bytesPerSync()
Allows OS to incrementally sync files to disk while they are being
written, asynchronously, in the background.
|
CompactionStyle |
compactionStyle()
Compaction style for DB.
|
CompressionType |
compressionType()
Compress blocks using the specified compression algorithm.
|
boolean |
createIfMissing()
Return true if the create_if_missing flag is set to true.
|
boolean |
createMissingColumnFamilies()
Return true if the create_missing_column_families flag is set
to true.
|
Options |
createStatistics()
Creates statistics object which collects metrics about database operations.
|
java.lang.String |
dbLogDir()
Returns the directory of info log.
|
long |
deleteObsoleteFilesPeriodMicros()
The periodicity when obsolete files get deleted.
|
boolean |
disableAutoCompactions()
Disable automatic compactions.
|
boolean |
disableDataSync()
If true, then the contents of data files are not synced
to stable storage.
|
protected void |
disposeInternal()
Release the memory allocated for the current instance
in the c++ side.
|
boolean |
errorIfExists()
If true, an error will be thrown during RocksDB.open() if the
database already exists.
|
int |
expandedCompactionFactor()
Maximum number of bytes in all compacted files.
|
boolean |
filterDeletes()
Use KeyMayExist API to filter deletes when this is true.
|
RocksEnv |
getEnv() |
double |
hardRateLimit()
Puts are delayed 1ms at a time when any level has a compaction score that
exceeds hard_rate_limit.
|
long |
inplaceUpdateNumLocks()
Number of locks used for inplace update
Default: 10000, if inplace_update_support = true, else 0.
|
boolean |
inplaceUpdateSupport()
Allows thread-safe inplace updates.
|
boolean |
isFdCloseOnExec()
Disable child process inherit open files.
|
long |
keepLogFileNum()
Returns the maximum number of info log files to be kept.
|
int |
levelZeroFileNumCompactionTrigger()
The number of files in level 0 to trigger compaction from level-0 to
level-1.
|
int |
levelZeroSlowdownWritesTrigger()
Soft limit on the number of level-0 files.
|
int |
levelZeroStopWritesTrigger()
Maximum number of level-0 files.
|
long |
logFileTimeToRoll()
Returns the time interval for the info log file to roll (in seconds).
|
long |
manifestPreallocationSize()
Number of bytes to preallocate (via fallocate) the manifest
files.
|
int |
maxBackgroundCompactions()
Returns the maximum number of concurrent background compaction jobs,
submitted to the default LOW priority thread pool.
|
int |
maxBackgroundFlushes()
Returns the maximum number of concurrent background flush jobs.
|
long |
maxBytesForLevelBase()
The upper-bound of the total size of level-1 files in bytes.
|
int |
maxBytesForLevelMultiplier()
The ratio between the total size of level-(L+1) files and the total
size of level-L files for all L.
|
int |
maxGrandparentOverlapFactor()
Control maximum bytes of overlaps in grandparent (i.e., level+2) before we
stop building a single file in a level->level+1 compaction.
|
long |
maxLogFileSize()
Returns the maximum size of a info log file.
|
long |
maxManifestFileSize()
Manifest file is rolled over on reaching this limit.
|
int |
maxMemCompactionLevel()
The highest level to which a new compacted memtable is pushed if it
does not create overlap.
|
int |
maxOpenFiles()
Number of open files that can be used by the DB.
|
long |
maxSequentialSkipInIterations()
An iteration->Next() sequentially skips over keys with the same
user-key unless this option is set.
|
long |
maxSuccessiveMerges()
Maximum number of successive merge operations on a key in the memtable.
|
long |
maxTotalWalSize()
Returns the max total wal size.
|
int |
maxWriteBufferNumber()
Returns maximum number of write buffers.
|
java.lang.String |
memTableFactoryName()
Returns the name of the current mem table representation.
|
int |
memtablePrefixBloomBits()
Returns the number of bits used in the prefix bloom filter.
|
int |
memtablePrefixBloomProbes()
The number of hash probes per key used in the mem-table.
|
int |
minPartialMergeOperands()
The number of partial merge operands to accumulate before partial
merge will be performed.
|
int |
minWriteBufferNumberToMerge()
The minimum number of write buffers that will be merged together
before writing to storage.
|
int |
numLevels()
If level-styled compaction is used, then this number determines
the total number of levels.
|
Options |
optimizeForPointLookup(long blockCacheSizeMb)
Use this if you don't need to keep the data sorted, i.e.
|
Options |
optimizeLevelStyleCompaction()
Default values for some parameters in ColumnFamilyOptions are not
optimized for heavy workloads and big datasets, which means you might
observe write stalls under some conditions.
|
Options |
optimizeLevelStyleCompaction(long memtableMemoryBudget)
Default values for some parameters in ColumnFamilyOptions are not
optimized for heavy workloads and big datasets, which means you might
observe write stalls under some conditions.
|
Options |
optimizeUniversalStyleCompaction()
Default values for some parameters in ColumnFamilyOptions are not
optimized for heavy workloads and big datasets, which means you might
observe write stalls under some conditions.
|
Options |
optimizeUniversalStyleCompaction(long memtableMemoryBudget)
Default values for some parameters in ColumnFamilyOptions are not
optimized for heavy workloads and big datasets, which means you might
observe write stalls under some conditions.
|
boolean |
paranoidChecks()
If true, the implementation will do aggressive checking of the
data it is processing and will stop early if it detects any
errors.
|
Options |
prepareForBulkLoad()
Set appropriate parameters for bulk loading.
|
boolean |
purgeRedundantKvsWhileFlush()
Purge duplicate/deleted keys when a memtable is flushed to storage.
|
int |
rateLimitDelayMaxMilliseconds()
The maximum time interval a put will be stalled when hard_rate_limit
is enforced.
|
Options |
setAdviseRandomOnOpen(boolean adviseRandomOnOpen)
If set true, will hint the underlying file system that the file
access pattern is random, when a sst file is opened.
|
Options |
setAllowMmapReads(boolean allowMmapReads)
Allow the OS to mmap file for reading sst tables.
|
Options |
setAllowMmapWrites(boolean allowMmapWrites)
Allow the OS to mmap file for writing.
|
Options |
setAllowOsBuffer(boolean allowOsBuffer)
Data being read from file storage may be buffered in the OS
Default: true
|
Options |
setArenaBlockSize(long arenaBlockSize)
The size of one block in arena memory allocation.
|
Options |
setBloomLocality(int bloomLocality)
Control locality of bloom filter probes to improve cache miss rate.
|
Options |
setBytesPerSync(long bytesPerSync)
Allows OS to incrementally sync files to disk while they are being
written, asynchronously, in the background.
|
Options |
setCompactionStyle(CompactionStyle compactionStyle)
Set compaction style for DB.
|
Options |
setComparator(AbstractComparator comparator)
Use the specified comparator for key ordering.
|
Options |
setComparator(BuiltinComparator builtinComparator)
Set
BuiltinComparator to be used with RocksDB. |
Options |
setCompressionType(CompressionType compressionType)
Compress blocks using the specified compression algorithm.
|
Options |
setCreateIfMissing(boolean flag)
If this value is set to true, then the database will be created
if it is missing during
RocksDB.open() . |
Options |
setCreateMissingColumnFamilies(boolean flag)
If true, missing column families will be automatically created
|
Options |
setDbLogDir(java.lang.String dbLogDir)
This specifies the info LOG dir.
|
Options |
setDeleteObsoleteFilesPeriodMicros(long micros)
The periodicity when obsolete files get deleted.
|
Options |
setDisableAutoCompactions(boolean disableAutoCompactions)
Disable automatic compactions.
|
Options |
setDisableDataSync(boolean disableDataSync)
If true, then the contents of manifest and data files are
not synced to stable storage.
|
Options |
setEnv(RocksEnv env)
Use the specified object to interact with the environment,
e.g.
|
Options |
setErrorIfExists(boolean errorIfExists)
If true, an error will be thrown during RocksDB.open() if the
database already exists.
|
Options |
setExpandedCompactionFactor(int expandedCompactionFactor)
Maximum number of bytes in all compacted files.
|
Options |
setFilterDeletes(boolean filterDeletes)
Use KeyMayExist API to filter deletes when this is true.
|
Options |
setHardRateLimit(double hardRateLimit)
Puts are delayed 1ms at a time when any level has a compaction score that
exceeds hard_rate_limit.
|
Options |
setInplaceUpdateNumLocks(long inplaceUpdateNumLocks)
Number of locks used for inplace update
Default: 10000, if inplace_update_support = true, else 0.
|
Options |
setInplaceUpdateSupport(boolean inplaceUpdateSupport)
Allows thread-safe inplace updates.
|
Options |
setIsFdCloseOnExec(boolean isFdCloseOnExec)
Disable child process inherit open files.
|
Options |
setKeepLogFileNum(long keepLogFileNum)
Specifies the maximum number of info log files to be kept.
|
Options |
setLevelZeroFileNumCompactionTrigger(int numFiles)
Number of files to trigger level-0 compaction.
|
Options |
setLevelZeroSlowdownWritesTrigger(int numFiles)
Soft limit on number of level-0 files.
|
Options |
setLevelZeroStopWritesTrigger(int numFiles)
Maximum number of level-0 files.
|
Options |
setLogFileTimeToRoll(long logFileTimeToRoll)
Specifies the time interval for the info log file to roll (in seconds).
|
Options |
setManifestPreallocationSize(long size)
Number of bytes to preallocate (via fallocate) the manifest
files.
|
Options |
setMaxBackgroundCompactions(int maxBackgroundCompactions)
Specifies the maximum number of concurrent background compaction jobs,
submitted to the default LOW priority thread pool.
|
Options |
setMaxBackgroundFlushes(int maxBackgroundFlushes)
Specifies the maximum number of concurrent background flush jobs.
|
Options |
setMaxBytesForLevelBase(long maxBytesForLevelBase)
The upper-bound of the total size of level-1 files in bytes.
|
Options |
setMaxBytesForLevelMultiplier(int multiplier)
The ratio between the total size of level-(L+1) files and the total
size of level-L files for all L.
|
Options |
setMaxGrandparentOverlapFactor(int maxGrandparentOverlapFactor)
Control maximum bytes of overlaps in grandparent (i.e., level+2) before we
stop building a single file in a level->level+1 compaction.
|
Options |
setMaxLogFileSize(long maxLogFileSize)
Specifies the maximum size of a info log file.
|
Options |
setMaxManifestFileSize(long maxManifestFileSize)
Manifest file is rolled over on reaching this limit.
|
Options |
setMaxMemCompactionLevel(int maxMemCompactionLevel)
The highest level to which a new compacted memtable is pushed if it
does not create overlap.
|
Options |
setMaxOpenFiles(int maxOpenFiles)
Number of open files that can be used by the DB.
|
Options |
setMaxSequentialSkipInIterations(long maxSequentialSkipInIterations)
An iteration->Next() sequentially skips over keys with the same
user-key unless this option is set.
|
Options |
setMaxSuccessiveMerges(long maxSuccessiveMerges)
Maximum number of successive merge operations on a key in the memtable.
|
Options |
setMaxTotalWalSize(long maxTotalWalSize)
Once write-ahead logs exceed this size, we will start forcing the
flush of column families whose memtables are backed by the oldest live
WAL file (i.e.
|
Options |
setMaxWriteBufferNumber(int maxWriteBufferNumber)
The maximum number of write buffers that are built up in memory.
|
Options |
setMemTableConfig(MemTableConfig config)
Set the config for mem-table.
|
Options |
setMemtablePrefixBloomBits(int memtablePrefixBloomBits)
Sets the number of bits used in the prefix bloom filter.
|
Options |
setMemtablePrefixBloomProbes(int memtablePrefixBloomProbes)
The number of hash probes per key used in the mem-table.
|
Options |
setMergeOperator(MergeOperator mergeOperator)
Set the merge operator to be used for merging two different key/value
pairs that share the same key.
|
Options |
setMergeOperatorName(java.lang.String name)
Set the merge operator to be used for merging two merge operands
of the same key.
|
Options |
setMinPartialMergeOperands(int minPartialMergeOperands)
The number of partial merge operands to accumulate before partial
merge will be performed.
|
Options |
setMinWriteBufferNumberToMerge(int minWriteBufferNumberToMerge)
The minimum number of write buffers that will be merged together
before writing to storage.
|
Options |
setNumLevels(int numLevels)
Set the number of levels for this database
If level-styled compaction is used, then this number determines
the total number of levels.
|
Options |
setParanoidChecks(boolean paranoidChecks)
If true, the implementation will do aggressive checking of the
data it is processing and will stop early if it detects any
errors.
|
Options |
setPurgeRedundantKvsWhileFlush(boolean purgeRedundantKvsWhileFlush)
Purge duplicate/deleted keys when a memtable is flushed to storage.
|
Options |
setRateLimitDelayMaxMilliseconds(int rateLimitDelayMaxMilliseconds)
The maximum time interval a put will be stalled when hard_rate_limit
is enforced.
|
Options |
setRateLimiterConfig(RateLimiterConfig config)
Use to control write rate of flush and compaction.
|
Options |
setSkipLogErrorOnRecovery(boolean skip)
Skip log corruption error on recovery (If client is ok with
losing most recent changes)
Default: false
|
Options |
setSoftRateLimit(double softRateLimit)
Puts are delayed 0-1 ms when any level has a compaction score that exceeds
soft_rate_limit.
|
Options |
setSourceCompactionFactor(int sourceCompactionFactor)
Maximum number of bytes in all source files to be compacted in a
single compaction run.
|
Options |
setStatsDumpPeriodSec(int statsDumpPeriodSec)
if not zero, dump rocksdb.stats to LOG every stats_dump_period_sec
Default: 3600 (1 hour)
|
Options |
setTableCacheNumshardbits(int tableCacheNumshardbits)
Number of shards used for table cache.
|
Options |
setTableCacheRemoveScanCountLimit(int limit)
During data eviction of table's LRU cache, it would be inefficient
to strictly follow LRU because this piece of memory will not really
be released unless its refcount falls to zero.
|
Options |
setTableFormatConfig(TableFormatConfig config)
Set the config for table format.
|
Options |
setTargetFileSizeBase(long targetFileSizeBase)
The target file size for compaction.
|
Options |
setTargetFileSizeMultiplier(int multiplier)
targetFileSizeMultiplier defines the size ratio between a
level-L file and level-(L+1) file.
|
Options |
setUseAdaptiveMutex(boolean useAdaptiveMutex)
Use adaptive mutex, which spins in the user space before resorting
to kernel.
|
Options |
setUseFsync(boolean useFsync)
If true, then every store to stable storage will issue a fsync.
|
Options |
setVerifyChecksumsInCompaction(boolean verifyChecksumsInCompaction)
If true, compaction will verify checksum on every read that happens
as part of compaction
Default: true
|
Options |
setWalDir(java.lang.String walDir)
This specifies the absolute dir path for write-ahead logs (WAL).
|
Options |
setWalSizeLimitMB(long sizeLimitMB)
WalTtlSeconds() and walSizeLimitMB() affect how archived logs
will be deleted.
|
Options |
setWalTtlSeconds(long walTtlSeconds)
DBOptionsInterface.walTtlSeconds() and DBOptionsInterface.walSizeLimitMB() affect how archived logs
will be deleted. |
Options |
setWriteBufferSize(long writeBufferSize)
Amount of data to build up in memory (backed by an unsorted log
on disk) before converting to a sorted on-disk file.
|
boolean |
skipLogErrorOnRecovery()
Skip log corruption error on recovery (If client is ok with
losing most recent changes)
Default: false
|
double |
softRateLimit()
Puts are delayed 0-1 ms when any level has a compaction score that exceeds
soft_rate_limit.
|
int |
sourceCompactionFactor()
Maximum number of bytes in all source files to be compacted in a
single compaction run.
|
Statistics |
statisticsPtr()
Returns statistics object.
|
int |
statsDumpPeriodSec()
If not zero, dump rocksdb.stats to LOG every stats_dump_period_sec
Default: 3600 (1 hour)
|
int |
tableCacheNumshardbits()
Number of shards used for table cache.
|
int |
tableCacheRemoveScanCountLimit()
During data eviction of table's LRU cache, it would be inefficient
to strictly follow LRU because this piece of memory will not really
be released unless its refcount falls to zero.
|
java.lang.String |
tableFactoryName() |
long |
targetFileSizeBase()
The target file size for compaction.
|
int |
targetFileSizeMultiplier()
targetFileSizeMultiplier defines the size ratio between a
level-(L+1) file and level-L file.
|
boolean |
useAdaptiveMutex()
Use adaptive mutex, which spins in the user space before resorting
to kernel.
|
Options |
useFixedLengthPrefixExtractor(int n)
This prefix-extractor uses the first n bytes of a key as its prefix.
|
boolean |
useFsync()
If true, then every store to stable storage will issue a fsync.
|
boolean |
verifyChecksumsInCompaction()
If true, compaction will verify checksum on every read that happens
as part of compaction
Default: true
|
java.lang.String |
walDir()
Returns the path to the write-ahead-logs (WAL) directory.
|
long |
walSizeLimitMB()
DBOptionsInterface.walTtlSeconds() and #walSizeLimitMB() affect how archived logs
will be deleted. |
long |
walTtlSeconds()
WalTtlSeconds() and walSizeLimitMB() affect how archived logs
will be deleted.
|
long |
writeBufferSize()
Return size of write buffer size.
|
disOwnNativeHandle, dispose, finalize, isInitialized, isOwningNativeHandle
public Options()
rocksdb::Options
in the c++ side.public Options setCreateIfMissing(boolean flag)
DBOptionsInterface
RocksDB.open()
.
Default: falsesetCreateIfMissing
in interface DBOptionsInterface
flag
- a flag indicating whether to create a database the
specified database in RocksDB.open(org.rocksdb.Options, String)
operation
is missing.RocksDB.open(org.rocksdb.Options, String)
public Options setCreateMissingColumnFamilies(boolean flag)
DBOptionsInterface
If true, missing column families will be automatically created
Default: false
setCreateMissingColumnFamilies
in interface DBOptionsInterface
flag
- a flag indicating if missing column families shall be
created automatically.public Options setEnv(RocksEnv env)
RocksEnv.getDefault()
public RocksEnv getEnv()
public Options prepareForBulkLoad()
public boolean createIfMissing()
DBOptionsInterface
createIfMissing
in interface DBOptionsInterface
DBOptionsInterface.setCreateIfMissing(boolean)
public boolean createMissingColumnFamilies()
DBOptionsInterface
createMissingColumnFamilies
in interface DBOptionsInterface
DBOptionsInterface.setCreateMissingColumnFamilies(boolean)
public Options optimizeForPointLookup(long blockCacheSizeMb)
ColumnFamilyOptionsInterface
optimizeForPointLookup
in interface ColumnFamilyOptionsInterface
blockCacheSizeMb
- Block cache size in MBpublic Options optimizeLevelStyleCompaction()
ColumnFamilyOptionsInterface
Default values for some parameters in ColumnFamilyOptions are not optimized for heavy workloads and big datasets, which means you might observe write stalls under some conditions. As a starting point for tuning RocksDB options, use the following for level style compaction.
Make sure to also call IncreaseParallelism(), which will provide the biggest performance gains.
Note: we might use more memory than memtable_memory_budget during high write rate period
optimizeLevelStyleCompaction
in interface ColumnFamilyOptionsInterface
public Options optimizeLevelStyleCompaction(long memtableMemoryBudget)
ColumnFamilyOptionsInterface
Default values for some parameters in ColumnFamilyOptions are not optimized for heavy workloads and big datasets, which means you might observe write stalls under some conditions. As a starting point for tuning RocksDB options, use the following for level style compaction.
Make sure to also call IncreaseParallelism(), which will provide the biggest performance gains.
Note: we might use more memory than memtable_memory_budget during high write rate period
optimizeLevelStyleCompaction
in interface ColumnFamilyOptionsInterface
memtableMemoryBudget
- memory budget in bytespublic Options optimizeUniversalStyleCompaction()
ColumnFamilyOptionsInterface
Default values for some parameters in ColumnFamilyOptions are not optimized for heavy workloads and big datasets, which means you might observe write stalls under some conditions. As a starting point for tuning RocksDB options, use the following for universal style compaction.
Universal style compaction is focused on reducing Write Amplification Factor for big data sets, but increases Space Amplification.
Make sure to also call IncreaseParallelism(), which will provide the biggest performance gains.
Note: we might use more memory than memtable_memory_budget during high write rate period
optimizeUniversalStyleCompaction
in interface ColumnFamilyOptionsInterface
public Options optimizeUniversalStyleCompaction(long memtableMemoryBudget)
ColumnFamilyOptionsInterface
Default values for some parameters in ColumnFamilyOptions are not optimized for heavy workloads and big datasets, which means you might observe write stalls under some conditions. As a starting point for tuning RocksDB options, use the following for universal style compaction.
Universal style compaction is focused on reducing Write Amplification Factor for big data sets, but increases Space Amplification.
Make sure to also call IncreaseParallelism(), which will provide the biggest performance gains.
Note: we might use more memory than memtable_memory_budget during high write rate period
optimizeUniversalStyleCompaction
in interface ColumnFamilyOptionsInterface
memtableMemoryBudget
- memory budget in bytespublic Options setComparator(BuiltinComparator builtinComparator)
ColumnFamilyOptionsInterface
BuiltinComparator
to be used with RocksDB.
Note: Comparator can be set once upon database creation.
Default: BytewiseComparator.setComparator
in interface ColumnFamilyOptionsInterface
builtinComparator
- a BuiltinComparator
type.public Options setComparator(AbstractComparator comparator)
ColumnFamilyOptionsInterface
setComparator
in interface ColumnFamilyOptionsInterface
comparator
- java instance.public Options setMergeOperatorName(java.lang.String name)
ColumnFamilyOptionsInterface
Set the merge operator to be used for merging two merge operands of the same key. The merge function is invoked during compaction and at lookup time, if multiple key/value pairs belonging to the same key are found in the database.
setMergeOperatorName
in interface ColumnFamilyOptionsInterface
name
- the name of the merge function, as defined by
the MergeOperators factory (see utilities/MergeOperators.h)
The merge function is specified by name and must be one of the
standard merge operators provided by RocksDB. The available
operators are "put", "uint64add", "stringappend" and "stringappendtest".public Options setMergeOperator(MergeOperator mergeOperator)
ColumnFamilyOptionsInterface
Set the merge operator to be used for merging two different key/value pairs that share the same key. The merge function is invoked during compaction and at lookup time, if multiple key/value pairs belonging to the same key are found in the database.
setMergeOperator
in interface ColumnFamilyOptionsInterface
mergeOperator
- MergeOperator
instance.public Options setWriteBufferSize(long writeBufferSize) throws RocksDBException
ColumnFamilyOptionsInterface
max_write_buffer_number
write buffers may be held in memory
at the same time, so you may wish to adjust this parameter
to control memory usage.
Also, a larger write buffer will result in a longer recovery time
the next time the database is opened.
Default: 4MBsetWriteBufferSize
in interface ColumnFamilyOptionsInterface
writeBufferSize
- the size of write buffer.RocksDBException
public long writeBufferSize()
ColumnFamilyOptionsInterface
writeBufferSize
in interface ColumnFamilyOptionsInterface
ColumnFamilyOptionsInterface.setWriteBufferSize(long)
public Options setMaxWriteBufferNumber(int maxWriteBufferNumber)
ColumnFamilyOptionsInterface
setMaxWriteBufferNumber
in interface ColumnFamilyOptionsInterface
maxWriteBufferNumber
- maximum number of write buffers.public int maxWriteBufferNumber()
ColumnFamilyOptionsInterface
maxWriteBufferNumber
in interface ColumnFamilyOptionsInterface
ColumnFamilyOptionsInterface.setMaxWriteBufferNumber(int)
public boolean errorIfExists()
DBOptionsInterface
errorIfExists
in interface DBOptionsInterface
public Options setErrorIfExists(boolean errorIfExists)
DBOptionsInterface
setErrorIfExists
in interface DBOptionsInterface
errorIfExists
- if true, an exception will be thrown
during RocksDB.open()
if the database already exists.RocksDB.open(org.rocksdb.Options, String)
public boolean paranoidChecks()
DBOptionsInterface
paranoidChecks
in interface DBOptionsInterface
public Options setParanoidChecks(boolean paranoidChecks)
DBOptionsInterface
setParanoidChecks
in interface DBOptionsInterface
paranoidChecks
- a flag to indicate whether paranoid-check
is on.public int maxOpenFiles()
DBOptionsInterface
target_file_size_base
and target_file_size_multiplier
for level-based compaction. For universal-style compaction, you can usually
set it to -1.maxOpenFiles
in interface DBOptionsInterface
public Options setMaxTotalWalSize(long maxTotalWalSize)
DBOptionsInterface
Once write-ahead logs exceed this size, we will start forcing the flush of column families whose memtables are backed by the oldest live WAL file (i.e. the ones that are causing all the space amplification).
If set to 0 (default), we will dynamically choose the WAL size limit to be [sum of all write_buffer_size * max_write_buffer_number] * 2
Default: 0
setMaxTotalWalSize
in interface DBOptionsInterface
public long maxTotalWalSize()
DBOptionsInterface
Returns the max total wal size. Once write-ahead logs exceed this size, we will start forcing the flush of column families whose memtables are backed by the oldest live WAL file (i.e. the ones that are causing all the space amplification).
If set to 0 (default), we will dynamically choose the WAL size limit to be [sum of all write_buffer_size * max_write_buffer_number] * 2
maxTotalWalSize
in interface DBOptionsInterface
public Options setMaxOpenFiles(int maxOpenFiles)
DBOptionsInterface
target_file_size_base
and target_file_size_multiplier
for level-based compaction. For universal-style compaction, you can usually
set it to -1.
Default: 5000setMaxOpenFiles
in interface DBOptionsInterface
maxOpenFiles
- the maximum number of open files.public boolean disableDataSync()
DBOptionsInterface
disableDataSync
in interface DBOptionsInterface
public Options setDisableDataSync(boolean disableDataSync)
DBOptionsInterface
If true, then the contents of manifest and data files are not synced to stable storage. Their contents remain in the OS buffers till theOS decides to flush them.
This option is good for bulk-loading of data.
Once the bulk-loading is complete, please issue a sync to the OS to flush all dirty buffers to stable storage.
Default: false
setDisableDataSync
in interface DBOptionsInterface
disableDataSync
- a boolean flag to specify whether to
disable data sync.public boolean useFsync()
DBOptionsInterface
If true, then every store to stable storage will issue a fsync.
If false, then every store to stable storage will issue a fdatasync. This parameter should be set to true while storing data to filesystem like ext3 that can lose files after a reboot.
useFsync
in interface DBOptionsInterface
public Options setUseFsync(boolean useFsync)
DBOptionsInterface
If true, then every store to stable storage will issue a fsync.
If false, then every store to stable storage will issue a fdatasync. This parameter should be set to true while storing data to filesystem like ext3 that can lose files after a reboot.
Default: false
setUseFsync
in interface DBOptionsInterface
useFsync
- a boolean flag to specify whether to use fsyncpublic java.lang.String dbLogDir()
DBOptionsInterface
dbLogDir
in interface DBOptionsInterface
public Options setDbLogDir(java.lang.String dbLogDir)
DBOptionsInterface
setDbLogDir
in interface DBOptionsInterface
dbLogDir
- the path to the info log directorypublic java.lang.String walDir()
DBOptionsInterface
walDir
in interface DBOptionsInterface
public Options setWalDir(java.lang.String walDir)
DBOptionsInterface
setWalDir
in interface DBOptionsInterface
walDir
- the path to the write-ahead-log directory.public long deleteObsoleteFilesPeriodMicros()
DBOptionsInterface
deleteObsoleteFilesPeriodMicros
in interface DBOptionsInterface
public Options setDeleteObsoleteFilesPeriodMicros(long micros)
DBOptionsInterface
setDeleteObsoleteFilesPeriodMicros
in interface DBOptionsInterface
micros
- the time interval in microspublic int maxBackgroundCompactions()
DBOptionsInterface
maxBackgroundCompactions
in interface DBOptionsInterface
RocksEnv.setBackgroundThreads(int)
,
RocksEnv.setBackgroundThreads(int, int)
public Options createStatistics()
DBOptionsInterface
Creates statistics object which collects metrics about database operations. Statistics objects should not be shared between DB instances as it does not use any locks to prevent concurrent updates.
createStatistics
in interface DBOptionsInterface
RocksDB.open(org.rocksdb.Options, String)
public Statistics statisticsPtr()
DBOptionsInterface
Returns statistics object. Calls DBOptionsInterface.createStatistics()
if
C++ returns nullptr
for statistics.
statisticsPtr
in interface DBOptionsInterface
DBOptionsInterface.createStatistics()
public Options setMaxBackgroundCompactions(int maxBackgroundCompactions)
DBOptionsInterface
setMaxBackgroundCompactions
in interface DBOptionsInterface
maxBackgroundCompactions
- the maximum number of background
compaction jobs.RocksEnv.setBackgroundThreads(int)
,
RocksEnv.setBackgroundThreads(int, int)
,
DBOptionsInterface.maxBackgroundFlushes()
public int maxBackgroundFlushes()
DBOptionsInterface
maxBackgroundFlushes
in interface DBOptionsInterface
RocksEnv.setBackgroundThreads(int)
,
RocksEnv.setBackgroundThreads(int, int)
public Options setMaxBackgroundFlushes(int maxBackgroundFlushes)
DBOptionsInterface
setMaxBackgroundFlushes
in interface DBOptionsInterface
maxBackgroundFlushes
- number of max concurrent flush jobsRocksEnv.setBackgroundThreads(int)
,
RocksEnv.setBackgroundThreads(int, int)
,
DBOptionsInterface.maxBackgroundCompactions()
public long maxLogFileSize()
DBOptionsInterface
maxLogFileSize
in interface DBOptionsInterface
public Options setMaxLogFileSize(long maxLogFileSize) throws RocksDBException
DBOptionsInterface
setMaxLogFileSize
in interface DBOptionsInterface
maxLogFileSize
- the maximum size of a info log file.RocksDBException
public long logFileTimeToRoll()
DBOptionsInterface
logFileTimeToRoll
in interface DBOptionsInterface
public Options setLogFileTimeToRoll(long logFileTimeToRoll) throws RocksDBException
DBOptionsInterface
setLogFileTimeToRoll
in interface DBOptionsInterface
logFileTimeToRoll
- the time interval in seconds.RocksDBException
public long keepLogFileNum()
DBOptionsInterface
keepLogFileNum
in interface DBOptionsInterface
public Options setKeepLogFileNum(long keepLogFileNum) throws RocksDBException
DBOptionsInterface
setKeepLogFileNum
in interface DBOptionsInterface
keepLogFileNum
- the maximum number of info log files to be kept.RocksDBException
public long maxManifestFileSize()
DBOptionsInterface
maxManifestFileSize
in interface DBOptionsInterface
public Options setMaxManifestFileSize(long maxManifestFileSize)
DBOptionsInterface
setMaxManifestFileSize
in interface DBOptionsInterface
maxManifestFileSize
- the size limit of a manifest file.public int tableCacheNumshardbits()
DBOptionsInterface
tableCacheNumshardbits
in interface DBOptionsInterface
public Options setTableCacheNumshardbits(int tableCacheNumshardbits)
DBOptionsInterface
setTableCacheNumshardbits
in interface DBOptionsInterface
tableCacheNumshardbits
- the number of chardspublic int tableCacheRemoveScanCountLimit()
DBOptionsInterface
tableCacheRemoveScanCountLimit
in interface DBOptionsInterface
public Options setTableCacheRemoveScanCountLimit(int limit)
DBOptionsInterface
setTableCacheRemoveScanCountLimit
in interface DBOptionsInterface
limit
- scan count limitpublic long walTtlSeconds()
DBOptionsInterface
walTtlSeconds
in interface DBOptionsInterface
DBOptionsInterface.walSizeLimitMB()
public Options setWalTtlSeconds(long walTtlSeconds)
DBOptionsInterface
DBOptionsInterface.walTtlSeconds()
and DBOptionsInterface.walSizeLimitMB()
affect how archived logs
will be deleted.
setWalTtlSeconds
in interface DBOptionsInterface
walTtlSeconds
- the ttl secondsDBOptionsInterface.setWalSizeLimitMB(long)
public long walSizeLimitMB()
DBOptionsInterface
DBOptionsInterface.walTtlSeconds()
and #walSizeLimitMB()
affect how archived logs
will be deleted.
walSizeLimitMB
in interface DBOptionsInterface
DBOptionsInterface.walSizeLimitMB()
public Options setWalSizeLimitMB(long sizeLimitMB)
DBOptionsInterface
setWalSizeLimitMB
in interface DBOptionsInterface
sizeLimitMB
- size limit in mega-bytes.DBOptionsInterface.setWalSizeLimitMB(long)
public long manifestPreallocationSize()
DBOptionsInterface
manifestPreallocationSize
in interface DBOptionsInterface
public Options setManifestPreallocationSize(long size) throws RocksDBException
DBOptionsInterface
setManifestPreallocationSize
in interface DBOptionsInterface
size
- the size in byteRocksDBException
public boolean allowOsBuffer()
DBOptionsInterface
allowOsBuffer
in interface DBOptionsInterface
public Options setAllowOsBuffer(boolean allowOsBuffer)
DBOptionsInterface
setAllowOsBuffer
in interface DBOptionsInterface
allowOsBuffer
- if true, then OS buffering is allowed.public boolean allowMmapReads()
DBOptionsInterface
allowMmapReads
in interface DBOptionsInterface
public Options setAllowMmapReads(boolean allowMmapReads)
DBOptionsInterface
setAllowMmapReads
in interface DBOptionsInterface
allowMmapReads
- true if mmap reads are allowed.public boolean allowMmapWrites()
DBOptionsInterface
allowMmapWrites
in interface DBOptionsInterface
public Options setAllowMmapWrites(boolean allowMmapWrites)
DBOptionsInterface
setAllowMmapWrites
in interface DBOptionsInterface
allowMmapWrites
- true if mmap writes are allowd.public boolean isFdCloseOnExec()
DBOptionsInterface
isFdCloseOnExec
in interface DBOptionsInterface
public Options setIsFdCloseOnExec(boolean isFdCloseOnExec)
DBOptionsInterface
setIsFdCloseOnExec
in interface DBOptionsInterface
isFdCloseOnExec
- true if child process inheriting open
files is disabled.public boolean skipLogErrorOnRecovery()
DBOptionsInterface
skipLogErrorOnRecovery
in interface DBOptionsInterface
public Options setSkipLogErrorOnRecovery(boolean skip)
DBOptionsInterface
setSkipLogErrorOnRecovery
in interface DBOptionsInterface
skip
- true if log corruption errors are skipped during recovery.public int statsDumpPeriodSec()
DBOptionsInterface
statsDumpPeriodSec
in interface DBOptionsInterface
public Options setStatsDumpPeriodSec(int statsDumpPeriodSec)
DBOptionsInterface
setStatsDumpPeriodSec
in interface DBOptionsInterface
statsDumpPeriodSec
- time interval in seconds.public boolean adviseRandomOnOpen()
DBOptionsInterface
adviseRandomOnOpen
in interface DBOptionsInterface
public Options setAdviseRandomOnOpen(boolean adviseRandomOnOpen)
DBOptionsInterface
setAdviseRandomOnOpen
in interface DBOptionsInterface
adviseRandomOnOpen
- true if hinting random access is on.public boolean useAdaptiveMutex()
DBOptionsInterface
useAdaptiveMutex
in interface DBOptionsInterface
public Options setUseAdaptiveMutex(boolean useAdaptiveMutex)
DBOptionsInterface
setUseAdaptiveMutex
in interface DBOptionsInterface
useAdaptiveMutex
- true if adaptive mutex is used.public long bytesPerSync()
DBOptionsInterface
bytesPerSync
in interface DBOptionsInterface
public Options setBytesPerSync(long bytesPerSync)
DBOptionsInterface
setBytesPerSync
in interface DBOptionsInterface
bytesPerSync
- size in bytespublic Options setMemTableConfig(MemTableConfig config) throws RocksDBException
ColumnFamilyOptionsInterface
setMemTableConfig
in interface ColumnFamilyOptionsInterface
config
- the mem-table config.RocksDBException
public Options setRateLimiterConfig(RateLimiterConfig config)
DBOptionsInterface
setRateLimiterConfig
in interface DBOptionsInterface
config
- rate limiter config.public java.lang.String memTableFactoryName()
ColumnFamilyOptionsInterface
memTableFactoryName
in interface ColumnFamilyOptionsInterface
ColumnFamilyOptionsInterface.setTableFormatConfig(org.rocksdb.TableFormatConfig)
public Options setTableFormatConfig(TableFormatConfig config)
ColumnFamilyOptionsInterface
setTableFormatConfig
in interface ColumnFamilyOptionsInterface
config
- the table format config.public java.lang.String tableFactoryName()
tableFactoryName
in interface ColumnFamilyOptionsInterface
public Options useFixedLengthPrefixExtractor(int n)
ColumnFamilyOptionsInterface
useFixedLengthPrefixExtractor
in interface ColumnFamilyOptionsInterface
n
- use the first n bytes of a key as its prefix.public CompressionType compressionType()
ColumnFamilyOptionsInterface
compressionType
in interface ColumnFamilyOptionsInterface
public Options setCompressionType(CompressionType compressionType)
ColumnFamilyOptionsInterface
setCompressionType
in interface ColumnFamilyOptionsInterface
compressionType
- Compression Type.public CompactionStyle compactionStyle()
ColumnFamilyOptionsInterface
compactionStyle
in interface ColumnFamilyOptionsInterface
public Options setCompactionStyle(CompactionStyle compactionStyle)
ColumnFamilyOptionsInterface
setCompactionStyle
in interface ColumnFamilyOptionsInterface
compactionStyle
- Compaction style.public int numLevels()
ColumnFamilyOptionsInterface
numLevels
in interface ColumnFamilyOptionsInterface
public Options setNumLevels(int numLevels)
ColumnFamilyOptionsInterface
setNumLevels
in interface ColumnFamilyOptionsInterface
numLevels
- the number of levels.public int levelZeroFileNumCompactionTrigger()
ColumnFamilyOptionsInterface
levelZeroFileNumCompactionTrigger
in interface ColumnFamilyOptionsInterface
public Options setLevelZeroFileNumCompactionTrigger(int numFiles)
ColumnFamilyOptionsInterface
setLevelZeroFileNumCompactionTrigger
in interface ColumnFamilyOptionsInterface
numFiles
- the number of files in level-0 to trigger compaction.public int levelZeroSlowdownWritesTrigger()
ColumnFamilyOptionsInterface
levelZeroSlowdownWritesTrigger
in interface ColumnFamilyOptionsInterface
public Options setLevelZeroSlowdownWritesTrigger(int numFiles)
ColumnFamilyOptionsInterface
setLevelZeroSlowdownWritesTrigger
in interface ColumnFamilyOptionsInterface
numFiles
- soft limit on number of level-0 files.public int levelZeroStopWritesTrigger()
ColumnFamilyOptionsInterface
levelZeroStopWritesTrigger
in interface ColumnFamilyOptionsInterface
public Options setLevelZeroStopWritesTrigger(int numFiles)
ColumnFamilyOptionsInterface
setLevelZeroStopWritesTrigger
in interface ColumnFamilyOptionsInterface
numFiles
- the hard limit of the number of level-0 files.public int maxMemCompactionLevel()
ColumnFamilyOptionsInterface
maxMemCompactionLevel
in interface ColumnFamilyOptionsInterface
public Options setMaxMemCompactionLevel(int maxMemCompactionLevel)
ColumnFamilyOptionsInterface
setMaxMemCompactionLevel
in interface ColumnFamilyOptionsInterface
maxMemCompactionLevel
- the highest level to which a new compacted
mem-table will be pushed.public long targetFileSizeBase()
ColumnFamilyOptionsInterface
targetFileSizeBase
in interface ColumnFamilyOptionsInterface
ColumnFamilyOptionsInterface.targetFileSizeMultiplier()
public Options setTargetFileSizeBase(long targetFileSizeBase)
ColumnFamilyOptionsInterface
setTargetFileSizeBase
in interface ColumnFamilyOptionsInterface
targetFileSizeBase
- the target size of a level-0 file.ColumnFamilyOptionsInterface.setTargetFileSizeMultiplier(int)
public int targetFileSizeMultiplier()
ColumnFamilyOptionsInterface
targetFileSizeMultiplier
in interface ColumnFamilyOptionsInterface
public Options setTargetFileSizeMultiplier(int multiplier)
ColumnFamilyOptionsInterface
setTargetFileSizeMultiplier
in interface ColumnFamilyOptionsInterface
multiplier
- the size ratio between a level-(L+1) file
and level-L file.public long maxBytesForLevelBase()
ColumnFamilyOptionsInterface
maxBytesForLevelBase
in interface ColumnFamilyOptionsInterface
ColumnFamilyOptionsInterface.maxBytesForLevelMultiplier()
public Options setMaxBytesForLevelBase(long maxBytesForLevelBase)
ColumnFamilyOptionsInterface
setMaxBytesForLevelBase
in interface ColumnFamilyOptionsInterface
ColumnFamilyOptionsInterface.setMaxBytesForLevelMultiplier(int)
public int maxBytesForLevelMultiplier()
ColumnFamilyOptionsInterface
maxBytesForLevelMultiplier
in interface ColumnFamilyOptionsInterface
ColumnFamilyOptionsInterface.maxBytesForLevelBase()
public Options setMaxBytesForLevelMultiplier(int multiplier)
ColumnFamilyOptionsInterface
setMaxBytesForLevelMultiplier
in interface ColumnFamilyOptionsInterface
multiplier
- the ratio between the total size of level-(L+1)
files and the total size of level-L files for all L.ColumnFamilyOptionsInterface.setMaxBytesForLevelBase(long)
public int expandedCompactionFactor()
ColumnFamilyOptionsInterface
expandedCompactionFactor
in interface ColumnFamilyOptionsInterface
ColumnFamilyOptionsInterface.sourceCompactionFactor()
public Options setExpandedCompactionFactor(int expandedCompactionFactor)
ColumnFamilyOptionsInterface
setExpandedCompactionFactor
in interface ColumnFamilyOptionsInterface
expandedCompactionFactor
- the maximum number of bytes in all
compacted files.ColumnFamilyOptionsInterface.setSourceCompactionFactor(int)
public int sourceCompactionFactor()
ColumnFamilyOptionsInterface
sourceCompactionFactor
in interface ColumnFamilyOptionsInterface
ColumnFamilyOptionsInterface.expandedCompactionFactor()
public Options setSourceCompactionFactor(int sourceCompactionFactor)
ColumnFamilyOptionsInterface
setSourceCompactionFactor
in interface ColumnFamilyOptionsInterface
sourceCompactionFactor
- the maximum number of bytes in all
source files to be compacted in a single compaction run.ColumnFamilyOptionsInterface.setExpandedCompactionFactor(int)
public int maxGrandparentOverlapFactor()
ColumnFamilyOptionsInterface
maxGrandparentOverlapFactor
in interface ColumnFamilyOptionsInterface
public Options setMaxGrandparentOverlapFactor(int maxGrandparentOverlapFactor)
ColumnFamilyOptionsInterface
setMaxGrandparentOverlapFactor
in interface ColumnFamilyOptionsInterface
maxGrandparentOverlapFactor
- maximum bytes of overlaps in
"grandparent" level.public double softRateLimit()
ColumnFamilyOptionsInterface
softRateLimit
in interface ColumnFamilyOptionsInterface
public Options setSoftRateLimit(double softRateLimit)
ColumnFamilyOptionsInterface
setSoftRateLimit
in interface ColumnFamilyOptionsInterface
softRateLimit
- the soft-rate-limit of a compaction score
for put delay.public double hardRateLimit()
ColumnFamilyOptionsInterface
hardRateLimit
in interface ColumnFamilyOptionsInterface
public Options setHardRateLimit(double hardRateLimit)
ColumnFamilyOptionsInterface
setHardRateLimit
in interface ColumnFamilyOptionsInterface
hardRateLimit
- the hard-rate-limit of a compaction score for put
delay.public int rateLimitDelayMaxMilliseconds()
ColumnFamilyOptionsInterface
rateLimitDelayMaxMilliseconds
in interface ColumnFamilyOptionsInterface
public Options setRateLimitDelayMaxMilliseconds(int rateLimitDelayMaxMilliseconds)
ColumnFamilyOptionsInterface
setRateLimitDelayMaxMilliseconds
in interface ColumnFamilyOptionsInterface
rateLimitDelayMaxMilliseconds
- the maximum time interval a put
will be stalled.public long arenaBlockSize()
ColumnFamilyOptionsInterface
arenaBlockSize
in interface ColumnFamilyOptionsInterface
public Options setArenaBlockSize(long arenaBlockSize) throws RocksDBException
ColumnFamilyOptionsInterface
setArenaBlockSize
in interface ColumnFamilyOptionsInterface
arenaBlockSize
- the size of an arena blockRocksDBException
public boolean disableAutoCompactions()
ColumnFamilyOptionsInterface
disableAutoCompactions
in interface ColumnFamilyOptionsInterface
public Options setDisableAutoCompactions(boolean disableAutoCompactions)
ColumnFamilyOptionsInterface
setDisableAutoCompactions
in interface ColumnFamilyOptionsInterface
disableAutoCompactions
- true if auto-compactions are disabled.public boolean purgeRedundantKvsWhileFlush()
ColumnFamilyOptionsInterface
purgeRedundantKvsWhileFlush
in interface ColumnFamilyOptionsInterface
public Options setPurgeRedundantKvsWhileFlush(boolean purgeRedundantKvsWhileFlush)
ColumnFamilyOptionsInterface
setPurgeRedundantKvsWhileFlush
in interface ColumnFamilyOptionsInterface
purgeRedundantKvsWhileFlush
- true if purging keys is disabled.public boolean verifyChecksumsInCompaction()
ColumnFamilyOptionsInterface
verifyChecksumsInCompaction
in interface ColumnFamilyOptionsInterface
public Options setVerifyChecksumsInCompaction(boolean verifyChecksumsInCompaction)
ColumnFamilyOptionsInterface
setVerifyChecksumsInCompaction
in interface ColumnFamilyOptionsInterface
verifyChecksumsInCompaction
- true if compaction verifies
checksum on every read.public boolean filterDeletes()
ColumnFamilyOptionsInterface
filterDeletes
in interface ColumnFamilyOptionsInterface
public Options setFilterDeletes(boolean filterDeletes)
ColumnFamilyOptionsInterface
setFilterDeletes
in interface ColumnFamilyOptionsInterface
filterDeletes
- true if filter-deletes behavior is on.public long maxSequentialSkipInIterations()
ColumnFamilyOptionsInterface
maxSequentialSkipInIterations
in interface ColumnFamilyOptionsInterface
public Options setMaxSequentialSkipInIterations(long maxSequentialSkipInIterations)
ColumnFamilyOptionsInterface
setMaxSequentialSkipInIterations
in interface ColumnFamilyOptionsInterface
maxSequentialSkipInIterations
- the number of keys could
be skipped in a iteration.public boolean inplaceUpdateSupport()
ColumnFamilyOptionsInterface
inplaceUpdateSupport
in interface ColumnFamilyOptionsInterface
public Options setInplaceUpdateSupport(boolean inplaceUpdateSupport)
ColumnFamilyOptionsInterface
setInplaceUpdateSupport
in interface ColumnFamilyOptionsInterface
inplaceUpdateSupport
- true if thread-safe inplace updates
are allowed.public long inplaceUpdateNumLocks()
ColumnFamilyOptionsInterface
inplaceUpdateNumLocks
in interface ColumnFamilyOptionsInterface
public Options setInplaceUpdateNumLocks(long inplaceUpdateNumLocks) throws RocksDBException
ColumnFamilyOptionsInterface
setInplaceUpdateNumLocks
in interface ColumnFamilyOptionsInterface
inplaceUpdateNumLocks
- the number of locks used for
inplace updates.RocksDBException
public int memtablePrefixBloomBits()
ColumnFamilyOptionsInterface
memtablePrefixBloomBits
in interface ColumnFamilyOptionsInterface
ColumnFamilyOptionsInterface.useFixedLengthPrefixExtractor(int)
public Options setMemtablePrefixBloomBits(int memtablePrefixBloomBits)
ColumnFamilyOptionsInterface
setMemtablePrefixBloomBits
in interface ColumnFamilyOptionsInterface
memtablePrefixBloomBits
- the number of bits used in the
prefix bloom filter.public int memtablePrefixBloomProbes()
ColumnFamilyOptionsInterface
memtablePrefixBloomProbes
in interface ColumnFamilyOptionsInterface
public Options setMemtablePrefixBloomProbes(int memtablePrefixBloomProbes)
ColumnFamilyOptionsInterface
setMemtablePrefixBloomProbes
in interface ColumnFamilyOptionsInterface
memtablePrefixBloomProbes
- the number of hash probes per key.public int bloomLocality()
ColumnFamilyOptionsInterface
bloomLocality
in interface ColumnFamilyOptionsInterface
ColumnFamilyOptionsInterface.setMemtablePrefixBloomProbes(int)
public Options setBloomLocality(int bloomLocality)
ColumnFamilyOptionsInterface
setBloomLocality
in interface ColumnFamilyOptionsInterface
bloomLocality
- the level of locality of bloom-filter probes.public long maxSuccessiveMerges()
ColumnFamilyOptionsInterface
maxSuccessiveMerges
in interface ColumnFamilyOptionsInterface
public Options setMaxSuccessiveMerges(long maxSuccessiveMerges) throws RocksDBException
ColumnFamilyOptionsInterface
setMaxSuccessiveMerges
in interface ColumnFamilyOptionsInterface
maxSuccessiveMerges
- the maximum number of successive merges.RocksDBException
public int minWriteBufferNumberToMerge()
ColumnFamilyOptionsInterface
minWriteBufferNumberToMerge
in interface ColumnFamilyOptionsInterface
public Options setMinWriteBufferNumberToMerge(int minWriteBufferNumberToMerge)
ColumnFamilyOptionsInterface
setMinWriteBufferNumberToMerge
in interface ColumnFamilyOptionsInterface
minWriteBufferNumberToMerge
- the minimum number of write buffers
that will be merged together.public int minPartialMergeOperands()
ColumnFamilyOptionsInterface
minPartialMergeOperands
in interface ColumnFamilyOptionsInterface
public Options setMinPartialMergeOperands(int minPartialMergeOperands)
ColumnFamilyOptionsInterface
setMinPartialMergeOperands
in interface ColumnFamilyOptionsInterface
minPartialMergeOperands
- min partial merge operandsprotected void disposeInternal()
disposeInternal
in class RocksObject