pub struct DedupSweeper { /* private fields */ }Expand description
Configurable TTL sweeper for haematite-backed dedup entries.
Implementations§
Source§impl DedupSweeper
impl DedupSweeper
Sourcepub const fn new(
cache: DedupCache,
ttl: Duration,
sweep_interval: Duration,
) -> Self
pub const fn new( cache: DedupCache, ttl: Duration, sweep_interval: Duration, ) -> Self
Creates a sweeper with caller-configured TTL and interval.
Sourcepub const fn sweep_interval(&self) -> Duration
pub const fn sweep_interval(&self) -> Duration
Returns the configured sweep interval.
Sourcepub async fn sweep_once(
&self,
now_millis: u64,
) -> Result<DedupSweepReport, DurabilityError>
pub async fn sweep_once( &self, now_millis: u64, ) -> Result<DedupSweepReport, DurabilityError>
Runs one scan-based sweep at the supplied epoch millisecond timestamp.
§Errors
Propagates store scan/append errors and serialized-entry decode errors.
Trait Implementations§
Source§impl Clone for DedupSweeper
impl Clone for DedupSweeper
Source§fn clone(&self) -> DedupSweeper
fn clone(&self) -> DedupSweeper
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for DedupSweeper
impl !UnwindSafe for DedupSweeper
impl Freeze for DedupSweeper
impl Send for DedupSweeper
impl Sync for DedupSweeper
impl Unpin for DedupSweeper
impl UnsafeUnpin for DedupSweeper
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