pub struct CacheResidencyPool { /* private fields */ }Expand description
Shareable aggregate ownership boundary for scheduler and standalone caches.
Implementations§
Source§impl CacheResidencyPool
impl CacheResidencyPool
Sourcepub fn new(limits: CachePoolLimits) -> Self
pub fn new(limits: CachePoolLimits) -> Self
Creates an empty process pool under aggregate finite limits.
Sourcepub const fn limits(&self) -> CachePoolLimits
pub const fn limits(&self) -> CachePoolLimits
Returns aggregate finite limits.
Sourcepub fn register_manager(
&self,
manager: u64,
) -> Result<CachePoolMembership, CachePoolError>
pub fn register_manager( &self, manager: u64, ) -> Result<CachePoolMembership, CachePoolError>
Registers a manager and returns its exact RAII membership token.
Sourcepub fn update_manager(
&self,
manager: u64,
usage: CachePoolUsage,
) -> Result<CachePoolUsage, CachePoolError>
pub fn update_manager( &self, manager: u64, usage: CachePoolUsage, ) -> Result<CachePoolUsage, CachePoolError>
Replaces the published occupancy owned by one registered manager.
Backends use reservations to admit growth before allocating it, publish the resulting concrete occupancy here, and then release the reservation. Publication records physical truth even when an unavoidable allocation boundary temporarily exceeds a limit; subsequent admissions fail and the backend must synchronously rebalance or roll back that allocation.
Sourcepub fn reserve(
&self,
usage: CachePoolUsage,
) -> Result<CachePoolReservation, CachePoolError>
pub fn reserve( &self, usage: CachePoolUsage, ) -> Result<CachePoolReservation, CachePoolError>
Atomically admits additional occupancy until its RAII token is dropped.
Sourcepub fn reserve_transfer(
&self,
bytes: u64,
) -> Result<CachePoolReservation, CachePoolError>
pub fn reserve_transfer( &self, bytes: u64, ) -> Result<CachePoolReservation, CachePoolError>
Atomically admits resources retained by one submitted transfer.
Sourcepub fn report(&self) -> Result<CachePoolReport, CachePoolError>
pub fn report(&self) -> Result<CachePoolReport, CachePoolError>
Returns aggregate current occupancy and high-water marks.
Trait Implementations§
Source§impl Clone for CacheResidencyPool
impl Clone for CacheResidencyPool
Source§fn clone(&self) -> CacheResidencyPool
fn clone(&self) -> CacheResidencyPool
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more