pub struct SystemCheckpointer { /* private fields */ }Implementations§
Source§impl SystemCheckpointer
impl SystemCheckpointer
pub fn new( store: Arc<SystemMetadataStore>, settings: SystemCheckpointSettings, ) -> Self
pub fn settings(&self) -> SystemCheckpointSettings
Sourcepub fn checkpoint_at_boot(
self: &Arc<Self>,
tenant: &EventSourcedTenantRepository,
)
pub fn checkpoint_at_boot( self: &Arc<Self>, tenant: &EventSourcedTenantRepository, )
Checkpoint the live state while nothing else can write: the tenant
repository has applied every resident tenant event. Builds now and
writes the file on a background thread; see Self::wait_pending.
Sourcepub fn wait_pending(&self) -> Option<Result<CheckpointOutcome>>
pub fn wait_pending(&self) -> Option<Result<CheckpointOutcome>>
Wait for a background checkpoint write started at boot.
Sourcepub fn checkpoint(&self) -> Result<Option<CheckpointOutcome>>
pub fn checkpoint(&self) -> Result<Option<CheckpointOutcome>>
Fold every tenant event since the last checkpoint onto it and write
the result. Returns None when nothing was written since.
Sourcepub fn verify_loaded(&self) -> Result<VerifyOutcome>
pub fn verify_loaded(&self) -> Result<VerifyOutcome>
Compare the checkpoint this store booted from with a fold of every WAL event it covers. On a difference every checkpoint is moved aside.
Auto Trait Implementations§
impl !Freeze for SystemCheckpointer
impl !RefUnwindSafe for SystemCheckpointer
impl !UnwindSafe for SystemCheckpointer
impl Forget for SystemCheckpointer
impl Send for SystemCheckpointer
impl Sync for SystemCheckpointer
impl Unpin for SystemCheckpointer
impl UnsafeUnpin for SystemCheckpointer
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