pub struct CheckpointManager { /* private fields */ }Expand description
Checkpointing and recovery system
Implementations§
Source§impl CheckpointManager
impl CheckpointManager
Sourcepub fn create_checkpoint(
&mut self,
job_id: &str,
state: JobState,
) -> Result<String, DistributedError>
pub fn create_checkpoint( &mut self, job_id: &str, state: JobState, ) -> Result<String, DistributedError>
Create checkpoint for job
Sourcepub fn restore_checkpoint(
&self,
checkpoint_id: &str,
) -> Result<JobState, DistributedError>
pub fn restore_checkpoint( &self, checkpoint_id: &str, ) -> Result<JobState, DistributedError>
Restore job from checkpoint
Sourcepub fn cleanup_old_checkpoints(&mut self, retention_period: Duration)
pub fn cleanup_old_checkpoints(&mut self, retention_period: Duration)
Clean up old checkpoints
Sourcepub fn get_checkpoint_stats(&self) -> CheckpointStats
pub fn get_checkpoint_stats(&self) -> CheckpointStats
Get checkpoint statistics
Auto Trait Implementations§
impl Freeze for CheckpointManager
impl RefUnwindSafe for CheckpointManager
impl Send for CheckpointManager
impl Sync for CheckpointManager
impl Unpin 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
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