pub struct TieredStorage { /* private fields */ }Expand description
Tiered storage: Hot -> Warm -> Cold -> Frozen
Implementations§
Source§impl TieredStorage
impl TieredStorage
pub fn new(config: TierConfig) -> Self
Sourcepub fn archive_old(&mut self, older_than: DateTime<Utc>)
pub fn archive_old(&mut self, older_than: DateTime<Utc>)
Force archive old blocks to frozen tier
Sourcepub fn total_bytes(&self) -> usize
pub fn total_bytes(&self) -> usize
Total bytes across all tiers
Sourcepub fn check_memory_pressure(&mut self, max_memory_bytes: usize)
pub fn check_memory_pressure(&mut self, max_memory_bytes: usize)
Check memory pressure and evict if needed
Sourcepub fn force_eviction(&mut self, max_memory_bytes: usize, target_ratio: f64)
pub fn force_eviction(&mut self, max_memory_bytes: usize, target_ratio: f64)
Force eviction to reduce memory to target ratio
Sourcepub fn total_blocks(&self) -> usize
pub fn total_blocks(&self) -> usize
Get count of total blocks across all tiers
Auto Trait Implementations§
impl Freeze for TieredStorage
impl RefUnwindSafe for TieredStorage
impl Send for TieredStorage
impl Sync for TieredStorage
impl Unpin for TieredStorage
impl UnsafeUnpin for TieredStorage
impl UnwindSafe for TieredStorage
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