pub trait DbCacheManagerOps {
// Required methods
fn warm_sst<'life0, 'life1, 'async_trait>(
&'life0 self,
sst_id: SsTableId,
targets: &'life1 [CacheTarget],
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn evict_cached_sst<'life0, 'async_trait>(
&'life0 self,
sst_id: SsTableId,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Trait for block-cache warming and eviction operations.
Required Methods§
Sourcefn warm_sst<'life0, 'life1, 'async_trait>(
&'life0 self,
sst_id: SsTableId,
targets: &'life1 [CacheTarget],
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn warm_sst<'life0, 'life1, 'async_trait>(
&'life0 self,
sst_id: SsTableId,
targets: &'life1 [CacheTarget],
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Warms selected cache content for one SST.
Callers fan out over SSTs themselves (for example with
FuturesUnordered) to get the concurrency they want. Per-target
outcomes are reflected in cache-manager metrics, not the return value.
Returns Err on the first failing target. If no block cache is
configured, or if the SST is not reachable from the current manifest,
the call is a no-op that returns Ok(()).
Sourcefn evict_cached_sst<'life0, 'async_trait>(
&'life0 self,
sst_id: SsTableId,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn evict_cached_sst<'life0, 'async_trait>(
&'life0 self,
sst_id: SsTableId,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Best-effort eviction of block-cache entries for one SST.
If no block cache is configured, logs a warning and returns Ok(()).
Does not check whether the SST is still live in the current manifest —
callers own that policy.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".