pub struct Config<BC: BlobCache, C: Compressor + Clone> { /* private fields */ }Expand description
Value log configuration
Implementations§
Source§impl<BC: BlobCache, C: Compressor + Clone + Default> Config<BC, C>
impl<BC: BlobCache, C: Compressor + Clone + Default> Config<BC, C>
Sourcepub fn compression(self, compressor: Option<C>) -> Self
pub fn compression(self, compressor: Option<C>) -> Self
Sets the compression & decompression scheme.
Sourcepub fn blob_cache(self, blob_cache: BC) -> Self
pub fn blob_cache(self, blob_cache: BC) -> Self
Sets the blob cache.
You can create a global BlobCache and share it between multiple
value logs to cap global cache memory usage.
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
Auto Trait Implementations§
impl<BC, C> Freeze for Config<BC, C>
impl<BC, C> RefUnwindSafe for Config<BC, C>where
BC: RefUnwindSafe,
C: RefUnwindSafe,
impl<BC, C> Send for Config<BC, C>
impl<BC, C> Sync for Config<BC, C>
impl<BC, C> Unpin for Config<BC, C>
impl<BC, C> UnwindSafe for Config<BC, C>where
BC: UnwindSafe,
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