pub struct Config<C: Compressor + Clone> { /* private fields */ }Expand description
Value log configuration
Implementations§
Source§impl<C: Compressor + Clone> Config<C>
impl<C: Compressor + Clone> Config<C>
Sourcepub fn compression(self, compressor: C) -> Self
pub fn compression(self, compressor: C) -> Self
Sets the compression & decompression scheme.
Sourcepub fn blob_cache(self, blob_cache: Arc<BlobCache>) -> Self
pub fn blob_cache(self, blob_cache: Arc<BlobCache>) -> Self
Sets the blob cache.
You can create a global BlobCache and share it between multiple
value logs to cap global cache memory usage.
Defaults to a blob cache with 16 MiB of capacity per value log.
Sourcepub fn segment_size_bytes(self, bytes: u64) -> Self
pub fn segment_size_bytes(self, bytes: u64) -> Self
Sets the maximum size of value log segments.
This heavily influences space amplification, as space reclamation works on a per-segment basis.
Like blob_file_size in RocksDB.
Default = 256 MiB
Trait Implementations§
Auto Trait Implementations§
impl<C> Freeze for Config<C>where
C: Freeze,
impl<C> RefUnwindSafe for Config<C>where
C: RefUnwindSafe,
impl<C> Send for Config<C>where
C: Send,
impl<C> Sync for Config<C>where
C: Sync,
impl<C> Unpin for Config<C>where
C: Unpin,
impl<C> UnwindSafe for Config<C>where
C: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more