Skip to main content

FlowInfoCache

Type Alias FlowInfoCache 

Source
pub type FlowInfoCache = CacheContainer<FlowId, Arc<FlowInfoValue>, CacheIdent>;
Expand description

Caches flow definitions by flow ID.

Aliased Type§

pub struct FlowInfoCache {
    name: String,
    cache: Cache<(usize, u32), Arc<FlowInfoValue>>,
    invalidation: Invalidation<u32, Arc<FlowInfoValue>, CacheIdent>,
    initializer: Arc<dyn Fn(&u32) -> Pin<Box<dyn Future<Output = Result<Option<Arc<FlowInfoValue>>, Error>> + Send + '_>> + Send + Sync>,
    batch_initializer: Option<Arc<dyn Fn(Vec<u32>) -> Pin<Box<dyn Future<Output = Result<HashMap<u32, Arc<FlowInfoValue>>, Error>> + Send>> + Send + Sync>>,
    epoch: Atomic<usize>,
}

Fields§

§name: String§cache: Cache<(usize, u32), Arc<FlowInfoValue>>§invalidation: Invalidation<u32, Arc<FlowInfoValue>, CacheIdent>§initializer: Arc<dyn Fn(&u32) -> Pin<Box<dyn Future<Output = Result<Option<Arc<FlowInfoValue>>, Error>> + Send + '_>> + Send + Sync>§batch_initializer: Option<Arc<dyn Fn(Vec<u32>) -> Pin<Box<dyn Future<Output = Result<HashMap<u32, Arc<FlowInfoValue>>, Error>> + Send>> + Send + Sync>>§epoch: Atomic<usize>