pub struct SstFileManager(/* private fields */);Expand description
SstFileManager is used to track SST files in the database and control their deletion rate.
All SstFileManager public functions are thread-safe.
SstFileManager can be used to:
- Set a limit on the total size of SST files. Once the limit is exceeded, writes will fail with a specific status.
- Control the deletion rate of obsolete files to avoid saturating the disk bandwidth with deletion operations.
- Track the total size of SST files and the total size of trash files.
See also: rocksdb/include/rocksdb/sst_file_manager.h
Implementations§
Source§impl SstFileManager
impl SstFileManager
pub fn new(env: &Env) -> Result<Self, Error>
pub fn set_max_allowed_space_usage(&self, max_allowed_space: u64)
pub fn set_compaction_buffer_size(&self, compaction_buffer_size: u64)
pub fn is_max_allowed_space_reached(&self) -> bool
pub fn is_max_allowed_space_reached_including_compactions(&self) -> bool
pub fn get_total_size(&self) -> u64
pub fn get_delete_rate_bytes_per_second(&self) -> i64
pub fn set_delete_rate_bytes_per_second(&self, delete_rate: i64)
pub fn get_max_trash_db_ratio(&self) -> f64
pub fn set_max_trash_db_ratio(&self, ratio: f64)
pub fn get_total_trash_size(&self) -> u64
Trait Implementations§
Source§impl Clone for SstFileManager
impl Clone for SstFileManager
Source§fn clone(&self) -> SstFileManager
fn clone(&self) -> SstFileManager
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SstFileManager
impl RefUnwindSafe for SstFileManager
impl Send for SstFileManager
impl Sync for SstFileManager
impl Unpin for SstFileManager
impl UnsafeUnpin for SstFileManager
impl UnwindSafe for SstFileManager
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