pub type TableFlownodeSetCache = CacheContainer<TableId, Arc<HashMap<FlownodeId, Peer>>, CacheIdent>;
Expand description
TableFlownodeSetCache caches the TableId to FlownodeSet mapping.
Aliased Type§
struct TableFlownodeSetCache {
name: String,
cache: Cache<u32, Arc<HashMap<u64, Peer>>>,
invalidator: Box<dyn for<'a> Fn(&'a Cache<u32, Arc<HashMap<u64, Peer>>>, &'a CacheIdent) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'a>> + Send + Sync>,
initializer: Arc<dyn Fn(&u32) -> Pin<Box<dyn Future<Output = Result<Option<Arc<HashMap<u64, Peer>>>, Error>> + Send + '_>> + Send + Sync>,
token_filter: fn(_: &CacheIdent) -> bool,
}
Fields§
§name: String
§cache: Cache<u32, Arc<HashMap<u64, Peer>>>
§invalidator: Box<dyn for<'a> Fn(&'a Cache<u32, Arc<HashMap<u64, Peer>>>, &'a CacheIdent) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'a>> + Send + Sync>
§initializer: Arc<dyn Fn(&u32) -> Pin<Box<dyn Future<Output = Result<Option<Arc<HashMap<u64, Peer>>>, Error>> + Send + '_>> + Send + Sync>
§token_filter: fn(_: &CacheIdent) -> bool