pub struct SortByIdCacheTracker;
Expand description
a cache tracker that just sorts by id, which is the time of first addition of a block
Trait Implementations§
Source§impl CacheTracker for SortByIdCacheTracker
impl CacheTracker for SortByIdCacheTracker
Source§fn sort_ids(&self, ids: &mut [i64])
fn sort_ids(&self, ids: &mut [i64])
sort ids by importance. More important ids should go to the end. Read more
Source§fn has_persistent_state(&self) -> bool
fn has_persistent_state(&self) -> bool
indicate whether
retain_ids
should be called on startupSource§fn blocks_accessed(&self, blocks: Vec<BlockInfo>)
fn blocks_accessed(&self, blocks: Vec<BlockInfo>)
called whenever blocks were accessed Read more
Source§fn blocks_written(&self, blocks: Vec<WriteInfo>)
fn blocks_written(&self, blocks: Vec<WriteInfo>)
called whenever blocks were written Read more
Source§fn blocks_deleted(&self, blocks: Vec<BlockInfo>)
fn blocks_deleted(&self, blocks: Vec<BlockInfo>)
called whenever blocks have been deleted by gc.
Source§fn retain_ids(&self, ids: &[i64])
fn retain_ids(&self, ids: &[i64])
notification that only these ids should be retained Read more
Auto Trait Implementations§
impl Freeze for SortByIdCacheTracker
impl RefUnwindSafe for SortByIdCacheTracker
impl Send for SortByIdCacheTracker
impl Sync for SortByIdCacheTracker
impl Unpin for SortByIdCacheTracker
impl UnwindSafe for SortByIdCacheTracker
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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