pub struct TombstoneTracker { /* private fields */ }Expand description
Small deterministic tombstone budget tracker used by the 0.41 gate tests.
Implementations§
Source§impl TombstoneTracker
impl TombstoneTracker
Sourcepub fn new(budget: TombstoneBudget) -> Self
pub fn new(budget: TombstoneBudget) -> Self
Create an empty tracker.
Sourcepub fn admit(
&mut self,
key: impl Into<String>,
version: u64,
approx_bytes: u64,
gc_eligible_after: Option<ClusterEpoch>,
) -> TombstoneAdmission
pub fn admit( &mut self, key: impl Into<String>, version: u64, approx_bytes: u64, gc_eligible_after: Option<ClusterEpoch>, ) -> TombstoneAdmission
Admit or replace a tombstone and enforce the budget.
Sourcepub fn confirm_repair(&mut self, key: &str, epoch: ClusterEpoch)
pub fn confirm_repair(&mut self, key: &str, epoch: ClusterEpoch)
Mark a tombstone as repair-confirmed and eligible after epoch.
Sourcepub fn gc_eligible_after(&self, key: &str) -> Option<ClusterEpoch>
pub fn gc_eligible_after(&self, key: &str) -> Option<ClusterEpoch>
Return the epoch after which a tombstone may be GC’d, if repair was confirmed.
Sourcepub fn forget(&mut self, key: &str) -> bool
pub fn forget(&mut self, key: &str) -> bool
Forget a tombstone after the durable record has been reclaimed.
Sourcepub fn repair_debt(&self) -> bool
pub fn repair_debt(&self) -> bool
Return whether the tracker is in repair debt.
Sourcepub fn contains_key(&self, key: &str) -> bool
pub fn contains_key(&self, key: &str) -> bool
Return whether the key is retained.
Trait Implementations§
Source§impl Clone for TombstoneTracker
impl Clone for TombstoneTracker
Source§fn clone(&self) -> TombstoneTracker
fn clone(&self) -> TombstoneTracker
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 Freeze for TombstoneTracker
impl RefUnwindSafe for TombstoneTracker
impl Send for TombstoneTracker
impl Sync for TombstoneTracker
impl Unpin for TombstoneTracker
impl UnsafeUnpin for TombstoneTracker
impl UnwindSafe for TombstoneTracker
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