pub struct FifoPicker { /* private fields */ }Expand description
A picker that pick block to eviction with a FIFO behavior.
Implementations§
Source§impl FifoPicker
impl FifoPicker
Sourcepub fn new(probation_ratio: f64) -> Self
pub fn new(probation_ratio: f64) -> Self
Create a new FifoPicker with the given probation_ratio (0.0 ~ 1.0).
The probation_ratio is the ratio of blocks that will be marked as probation.
The blocks that are marked as probation will be evicted first.
The default value is 0.1.
Trait Implementations§
Source§impl Debug for FifoPicker
impl Debug for FifoPicker
Source§impl Default for FifoPicker
impl Default for FifoPicker
Source§impl EvictionPicker for FifoPicker
impl EvictionPicker for FifoPicker
Source§fn on_block_evictable(&mut self, _: EvictionInfo<'_>, block: u32)
fn on_block_evictable(&mut self, _: EvictionInfo<'_>, block: u32)
Notify the picker that a block is ready to pick.
Source§fn on_block_evict(&mut self, _: EvictionInfo<'_>, block: u32)
fn on_block_evict(&mut self, _: EvictionInfo<'_>, block: u32)
Notify the picker that a block is evicted.
Auto Trait Implementations§
impl Freeze for FifoPicker
impl RefUnwindSafe for FifoPicker
impl Send for FifoPicker
impl Sync for FifoPicker
impl Unpin for FifoPicker
impl UnwindSafe for FifoPicker
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