pub struct CheckpointManager { /* private fields */ }Expand description
Tracks when the next checkpoint should occur.
Implementations§
Source§impl CheckpointManager
impl CheckpointManager
pub fn new(config: CheckpointConfig) -> Self
Sourcepub fn record_entry(&self)
pub fn record_entry(&self)
Record that a WAL entry was appended.
Sourcepub fn should_checkpoint(&self) -> bool
pub fn should_checkpoint(&self) -> bool
Should a checkpoint be taken now?
Sourcepub fn checkpoint_taken(&self)
pub fn checkpoint_taken(&self)
Record that a checkpoint was taken.
Sourcepub fn total_checkpoints(&self) -> u64
pub fn total_checkpoints(&self) -> u64
Total checkpoints taken since start.
Sourcepub fn entries_since_checkpoint(&self) -> usize
pub fn entries_since_checkpoint(&self) -> usize
Entries since last checkpoint.
Auto Trait Implementations§
impl !Freeze for CheckpointManager
impl RefUnwindSafe for CheckpointManager
impl Send for CheckpointManager
impl Sync for CheckpointManager
impl Unpin for CheckpointManager
impl UnsafeUnpin for CheckpointManager
impl UnwindSafe for CheckpointManager
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