pub struct ManagerCheckpointer<S: CheckpointStore> { /* private fields */ }Expand description
Persists snapshot checkpoints through the shared SyncManager, reusing
any CheckpointStore backend (filesystem, SurrealDB, …).
Implementations§
Source§impl<S: CheckpointStore> ManagerCheckpointer<S>
impl<S: CheckpointStore> ManagerCheckpointer<S>
Sourcepub fn new(manager: SyncManager<S>) -> Self
pub fn new(manager: SyncManager<S>) -> Self
Wrap a sync manager.
Sourcepub async fn save_handoff(
&self,
checkpoint: &InterleavedSnapshotCheckpoint,
) -> Result<()>
pub async fn save_handoff( &self, checkpoint: &InterleavedSnapshotCheckpoint, ) -> Result<()>
Persist the final checkpoint under the handoff phase, recording the position downstream incremental/live processing should resume from.
Sourcepub fn manager(&self) -> &SyncManager<S>
pub fn manager(&self) -> &SyncManager<S>
Access the underlying sync manager.
Trait Implementations§
Source§impl<S: CheckpointStore> SnapshotCheckpointer for ManagerCheckpointer<S>
impl<S: CheckpointStore> SnapshotCheckpointer for ManagerCheckpointer<S>
Source§fn save_progress<'life0, 'life1, 'async_trait>(
&'life0 mut self,
checkpoint: &'life1 InterleavedSnapshotCheckpoint,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn save_progress<'life0, 'life1, 'async_trait>(
&'life0 mut self,
checkpoint: &'life1 InterleavedSnapshotCheckpoint,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Persist progress made so far. Called after each chunk is durably
applied to the sink and before the corresponding change-log data is
freed.
Auto Trait Implementations§
impl<S> Freeze for ManagerCheckpointer<S>where
S: Freeze,
impl<S> RefUnwindSafe for ManagerCheckpointer<S>where
S: RefUnwindSafe,
impl<S> Send for ManagerCheckpointer<S>
impl<S> Sync for ManagerCheckpointer<S>
impl<S> Unpin for ManagerCheckpointer<S>where
S: Unpin,
impl<S> UnsafeUnpin for ManagerCheckpointer<S>where
S: UnsafeUnpin,
impl<S> UnwindSafe for ManagerCheckpointer<S>where
S: UnwindSafe,
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