Package org.rocksdb
Class HashSkipListMemTableConfig
java.lang.Object
org.rocksdb.MemTableConfig
org.rocksdb.HashSkipListMemTableConfig
The config for hash skip-list mem-table representation.
Such mem-table representation contains a fix-sized array of
buckets, where each bucket points to a skiplist (or null if the
bucket is empty).
Note that since this mem-table representation relies on the key prefix, it is required to invoke one of the usePrefixExtractor functions to specify how to extract key prefix given a key. If proper prefix-extractor is not set, then RocksDB will use the default memtable representation (SkipList) instead and post a warning in the LOG.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintlongintheight()protected longThis function should only be called by Options.setMemTableConfig(), which will create a c++ shared-pointer to the c++ MemTableRepFactory that associated with the Java MemTableConfig.setBranchingFactor(int bf) Set the branching factor used in the hash skip-list memtable.setBucketCount(long count) Set the number of hash buckets used in the hash skiplist memtable.setHeight(int height) Set the height of the skip list.
-
Field Details
-
DEFAULT_BUCKET_COUNT
public static final int DEFAULT_BUCKET_COUNT- See Also:
-
DEFAULT_BRANCHING_FACTOR
public static final int DEFAULT_BRANCHING_FACTOR- See Also:
-
DEFAULT_HEIGHT
public static final int DEFAULT_HEIGHT- See Also:
-
-
Constructor Details
-
HashSkipListMemTableConfig
public HashSkipListMemTableConfig()HashSkipListMemTableConfig constructor
-
-
Method Details
-
setBucketCount
Set the number of hash buckets used in the hash skiplist memtable. Default = 1000000.- Parameters:
count- the number of hash buckets used in the hash skiplist memtable.- Returns:
- the reference to the current HashSkipListMemTableConfig.
-
bucketCount
public long bucketCount()- Returns:
- the number of hash buckets
-
setHeight
Set the height of the skip list. Default = 4.- Parameters:
height- height to set.- Returns:
- the reference to the current HashSkipListMemTableConfig.
-
height
public int height()- Returns:
- the height of the skip list.
-
setBranchingFactor
Set the branching factor used in the hash skip-list memtable. This factor controls the probabilistic size ratio between adjacent links in the skip list.- Parameters:
bf- the probabilistic size ratio between adjacent link lists in the skip list.- Returns:
- the reference to the current HashSkipListMemTableConfig.
-
branchingFactor
public int branchingFactor()- Returns:
- branching factor, the probabilistic size ratio between adjacent links in the skip list.
-
newMemTableFactoryHandle
protected long newMemTableFactoryHandle()Description copied from class:MemTableConfigThis function should only be called by Options.setMemTableConfig(), which will create a c++ shared-pointer to the c++ MemTableRepFactory that associated with the Java MemTableConfig.- Specified by:
newMemTableFactoryHandlein classMemTableConfig- Returns:
- native handle address to native memory table instance.
- See Also:
-