pub struct CheckpointCoordinator { /* private fields */ }Expand description
Checkpoint coordinator.
Implementations§
Source§impl CheckpointCoordinator
impl CheckpointCoordinator
Sourcepub fn new(config: CheckpointConfig) -> Self
pub fn new(config: CheckpointConfig) -> Self
Create a new checkpoint coordinator.
Sourcepub async fn trigger_checkpoint(&self) -> Result<u64>
pub async fn trigger_checkpoint(&self) -> Result<u64>
Trigger a new checkpoint.
Sourcepub async fn complete_checkpoint(
&self,
checkpoint_id: u64,
success: bool,
) -> Result<()>
pub async fn complete_checkpoint( &self, checkpoint_id: u64, success: bool, ) -> Result<()>
Complete a checkpoint.
Sourcepub async fn active_count(&self) -> usize
pub async fn active_count(&self) -> usize
Get active checkpoint count.
Sourcepub async fn completed_count(&self) -> usize
pub async fn completed_count(&self) -> usize
Get completed checkpoint count.
Sourcepub async fn latest_checkpoint(&self) -> Option<u64>
pub async fn latest_checkpoint(&self) -> Option<u64>
Get the latest completed checkpoint ID.
Sourcepub async fn clear_old_checkpoints(&self, keep_count: usize)
pub async fn clear_old_checkpoints(&self, keep_count: usize)
Clear old checkpoints.
Sourcepub async fn start_periodic_checkpointing(self: Arc<Self>)
pub async fn start_periodic_checkpointing(self: Arc<Self>)
Start periodic checkpointing.
Auto Trait Implementations§
impl Freeze for CheckpointCoordinator
impl !RefUnwindSafe for CheckpointCoordinator
impl Send for CheckpointCoordinator
impl Sync for CheckpointCoordinator
impl Unpin for CheckpointCoordinator
impl UnsafeUnpin for CheckpointCoordinator
impl !UnwindSafe for CheckpointCoordinator
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