pub struct DefaultFileStatisticsCache { /* private fields */ }Expand description
Default implementation of FileStatisticsCache
Stores cached file metadata (statistics and orderings) for files.
The typical usage pattern is:
- Call
get(path)to check for cached value - If
Some(cached), validate withcached.is_valid_for(¤t_meta) - If invalid or missing, compute new value and call
put(path, new_value)
Uses DashMap for lock-free concurrent access.
Trait Implementations§
Source§impl CacheAccessor<Path, CachedFileMetadata> for DefaultFileStatisticsCache
impl CacheAccessor<Path, CachedFileMetadata> for DefaultFileStatisticsCache
Source§fn get(&self, key: &Path) -> Option<CachedFileMetadata>
fn get(&self, key: &Path) -> Option<CachedFileMetadata>
Get a cached entry if it exists. Read more
Source§fn put(
&self,
key: &Path,
value: CachedFileMetadata,
) -> Option<CachedFileMetadata>
fn put( &self, key: &Path, value: CachedFileMetadata, ) -> Option<CachedFileMetadata>
Store a value in the cache. Read more
Source§fn remove(&self, k: &Path) -> Option<CachedFileMetadata>
fn remove(&self, k: &Path) -> Option<CachedFileMetadata>
Remove an entry from the cache, returning the value if it existed.
Source§fn contains_key(&self, k: &Path) -> bool
fn contains_key(&self, k: &Path) -> bool
Check if the cache contains a specific key.
Source§impl Default for DefaultFileStatisticsCache
impl Default for DefaultFileStatisticsCache
Source§fn default() -> DefaultFileStatisticsCache
fn default() -> DefaultFileStatisticsCache
Returns the “default value” for a type. Read more
Source§impl FileStatisticsCache for DefaultFileStatisticsCache
impl FileStatisticsCache for DefaultFileStatisticsCache
Source§fn list_entries(&self) -> HashMap<Path, FileStatisticsCacheEntry>
fn list_entries(&self) -> HashMap<Path, FileStatisticsCacheEntry>
Retrieves the information about the entries currently cached.
Auto Trait Implementations§
impl Freeze for DefaultFileStatisticsCache
impl !RefUnwindSafe for DefaultFileStatisticsCache
impl Send for DefaultFileStatisticsCache
impl Sync for DefaultFileStatisticsCache
impl Unpin for DefaultFileStatisticsCache
impl UnsafeUnpin for DefaultFileStatisticsCache
impl !UnwindSafe for DefaultFileStatisticsCache
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more