Struct rocksdb::CuckooTableOptions
source · [−]pub struct CuckooTableOptions { /* private fields */ }Expand description
Configuration of cuckoo-based storage.
Implementations
sourceimpl CuckooTableOptions
impl CuckooTableOptions
sourcepub fn set_hash_ratio(&mut self, ratio: f64)
pub fn set_hash_ratio(&mut self, ratio: f64)
Determines the utilization of hash tables. Smaller values result in larger hash tables with fewer collisions. Default: 0.9
sourcepub fn set_max_search_depth(&mut self, depth: u32)
pub fn set_max_search_depth(&mut self, depth: u32)
A property used by builder to determine the depth to go to to search for a path to displace elements in case of collision. See Builder.MakeSpaceForKey method. Higher values result in more efficient hash tables with fewer lookups but take more time to build. Default: 100
sourcepub fn set_cuckoo_block_size(&mut self, size: u32)
pub fn set_cuckoo_block_size(&mut self, size: u32)
In case of collision while inserting, the builder attempts to insert in the next cuckoo_block_size locations before skipping over to the next Cuckoo hash function. This makes lookups more cache friendly in case of collisions. Default: 5
sourcepub fn set_identity_as_first_hash(&mut self, flag: bool)
pub fn set_identity_as_first_hash(&mut self, flag: bool)
If this option is enabled, user key is treated as uint64_t and its value is used as hash value directly. This option changes builder’s behavior. Reader ignore this option and behave according to what specified in table property. Default: false
sourcepub fn set_use_module_hash(&mut self, flag: bool)
pub fn set_use_module_hash(&mut self, flag: bool)
If this option is set to true, module is used during hash calculation. This often yields better space efficiency at the cost of performance. If this option is set to false, # of entries in table is constrained to be power of two, and bit and is used to calculate hash, which is faster in general. Default: true
Trait Implementations
sourceimpl Default for CuckooTableOptions
impl Default for CuckooTableOptions
sourceimpl Drop for CuckooTableOptions
impl Drop for CuckooTableOptions
impl Send for CuckooTableOptions
impl Sync for CuckooTableOptions
Auto Trait Implementations
impl RefUnwindSafe for CuckooTableOptions
impl Unpin for CuckooTableOptions
impl UnwindSafe for CuckooTableOptions
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more