pub struct SstFileManager(/* private fields */);Implementations§
Source§impl SstFileManager
impl SstFileManager
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new SstFileManager using the default Env.
SstFileManager tracks and controls total SST file space usage, enabling applications to cap disk utilization and throttle deletions. see docs for more details.
Sourcepub fn set_max_allowed_space_usage(&self, bytes: u64)
pub fn set_max_allowed_space_usage(&self, bytes: u64)
Sets the maximum allowed total SST file size in bytes.
Sourcepub fn set_compaction_buffer_size(&self, bytes: u64)
pub fn set_compaction_buffer_size(&self, bytes: u64)
Sets the compaction buffer size in bytes used by the manager for space accounting.
Sourcepub fn is_max_allowed_space_reached(&self) -> bool
pub fn is_max_allowed_space_reached(&self) -> bool
Returns true if the total SST file size has reached or exceeded the configured limit.
Sourcepub fn is_max_allowed_space_reached_including_compactions(&self) -> bool
pub fn is_max_allowed_space_reached_including_compactions(&self) -> bool
Returns true if the space limit is reached, including compaction output under accounting.
Sourcepub fn get_total_size(&self) -> u64
pub fn get_total_size(&self) -> u64
Returns the total size of SST files tracked by this manager in bytes.
Sourcepub fn get_delete_rate_bytes_per_second(&self) -> i64
pub fn get_delete_rate_bytes_per_second(&self) -> i64
Returns the configured file deletion rate in bytes per second. Negative means unlimited.
Sourcepub fn set_delete_rate_bytes_per_second(&self, rate: i64)
pub fn set_delete_rate_bytes_per_second(&self, rate: i64)
Sets the file deletion rate in bytes per second. Use a negative value to disable limiting.
Sourcepub fn get_max_trash_db_ratio(&self) -> f64
pub fn get_max_trash_db_ratio(&self) -> f64
Returns the maximum trash-to-DB size ratio used for trash space control.
Sourcepub fn set_max_trash_db_ratio(&self, ratio: f64)
pub fn set_max_trash_db_ratio(&self, ratio: f64)
Sets the maximum trash-to-DB size ratio used for trash space control.
Sourcepub fn get_total_trash_size(&self) -> u64
pub fn get_total_trash_size(&self) -> u64
Returns the total trash size tracked by this manager in bytes.
Trait Implementations§
Source§impl Clone for SstFileManager
impl Clone for SstFileManager
Source§fn clone(&self) -> SstFileManager
fn clone(&self) -> SstFileManager
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more