pub struct IntegratedCacheManager {
pub message_buffer: MessageBuffer,
pub raft_cache: RaftLogCache,
pub block_cache: Arc<BlockCacheHandle>,
pub total_budget: usize,
pub allocation_ratio: AllocationRatio,
/* private fields */
}Expand description
Coordinates the memory owned by Chirps subsystems under the existing
MemoryManager budget.
Fields§
§message_buffer: MessageBuffer§raft_cache: RaftLogCache§block_cache: Arc<BlockCacheHandle>§total_budget: usize§allocation_ratio: AllocationRatioImplementations§
Source§impl IntegratedCacheManager
impl IntegratedCacheManager
pub fn new(config: MemoryConfig) -> Result<Self, MemoryError>
pub fn with_block_cache( config: MemoryConfig, block_cache: Arc<BlockCacheHandle>, ) -> Result<Self, MemoryError>
Sourcepub fn rebalance(&mut self, workload: WorkloadProfile)
pub fn rebalance(&mut self, workload: WorkloadProfile)
Reallocates component caps and evicts immediately when a new cap is below current usage. The shared MemoryManager remains the accounting source of truth used by MeshHandle.
Sourcepub fn emergency_evict(&mut self, target_bytes: usize) -> usize
pub fn emergency_evict(&mut self, target_bytes: usize) -> usize
Frees at least as much as possible from the least durable in-memory layers and returns the number of bytes actually released.
pub fn get_unified_metrics(&self) -> UnifiedMemoryMetrics
Sourcepub fn set_connection_pool_usage(&mut self, bytes: usize)
pub fn set_connection_pool_usage(&mut self, bytes: usize)
Records bytes owned by the QUIC connection/session layer in the same budget. The transport can update this at its own sampling boundary.
pub fn memory_manager(&self) -> Arc<MemoryManager> ⓘ
Auto Trait Implementations§
impl Freeze for IntegratedCacheManager
impl RefUnwindSafe for IntegratedCacheManager
impl Send for IntegratedCacheManager
impl Sync for IntegratedCacheManager
impl Unpin for IntegratedCacheManager
impl UnsafeUnpin for IntegratedCacheManager
impl UnwindSafe for IntegratedCacheManager
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