pub trait Checkpointer: Send + Sync {
// Required methods
fn save_manifest<'life0, 'life1, 'async_trait>(
&'life0 self,
manifest: &'life1 CheckpointManifestV2,
) -> Pin<Box<dyn Future<Output = Result<(), CheckpointerError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn load_manifest<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 CheckpointId,
) -> Pin<Box<dyn Future<Output = Result<CheckpointManifestV2, CheckpointerError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn save_snapshot<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 CheckpointId,
operator: &'life2 str,
partition: u32,
data: Bytes,
) -> Pin<Box<dyn Future<Output = Result<String, CheckpointerError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn save_delta<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 CheckpointId,
operator: &'life2 str,
partition: u32,
data: Bytes,
) -> Pin<Box<dyn Future<Output = Result<String, CheckpointerError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn load_artifact<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Bytes, CheckpointerError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn update_latest<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 CheckpointId,
) -> Pin<Box<dyn Future<Output = Result<(), CheckpointerError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn read_latest<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<CheckpointId>, CheckpointerError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn list_checkpoints<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<CheckpointId>, CheckpointerError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn delete_checkpoint<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 CheckpointId,
) -> Pin<Box<dyn Future<Output = Result<(), CheckpointerError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Async trait for checkpoint persistence operations.
Implementations handle writing/reading checkpoint artifacts to durable storage. The checkpoint coordinator calls these methods during the checkpoint commit protocol.
Required Methods§
Sourcefn save_manifest<'life0, 'life1, 'async_trait>(
&'life0 self,
manifest: &'life1 CheckpointManifestV2,
) -> Pin<Box<dyn Future<Output = Result<(), CheckpointerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn save_manifest<'life0, 'life1, 'async_trait>(
&'life0 self,
manifest: &'life1 CheckpointManifestV2,
) -> Pin<Box<dyn Future<Output = Result<(), CheckpointerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Write a manifest to the checkpoint store.
Sourcefn load_manifest<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 CheckpointId,
) -> Pin<Box<dyn Future<Output = Result<CheckpointManifestV2, CheckpointerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_manifest<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 CheckpointId,
) -> Pin<Box<dyn Future<Output = Result<CheckpointManifestV2, CheckpointerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Load a manifest by checkpoint ID.
Sourcefn save_snapshot<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 CheckpointId,
operator: &'life2 str,
partition: u32,
data: Bytes,
) -> Pin<Box<dyn Future<Output = Result<String, CheckpointerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn save_snapshot<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 CheckpointId,
operator: &'life2 str,
partition: u32,
data: Bytes,
) -> Pin<Box<dyn Future<Output = Result<String, CheckpointerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Write a state snapshot for a single operator partition.
Returns the SHA-256 hex digest of the written data.
Sourcefn save_delta<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 CheckpointId,
operator: &'life2 str,
partition: u32,
data: Bytes,
) -> Pin<Box<dyn Future<Output = Result<String, CheckpointerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn save_delta<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 CheckpointId,
operator: &'life2 str,
partition: u32,
data: Bytes,
) -> Pin<Box<dyn Future<Output = Result<String, CheckpointerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Write an incremental delta for a single operator partition.
Returns the SHA-256 hex digest of the written data.
Sourcefn load_artifact<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Bytes, CheckpointerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_artifact<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Bytes, CheckpointerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Load a snapshot or delta by path.
Sourcefn update_latest<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 CheckpointId,
) -> Pin<Box<dyn Future<Output = Result<(), CheckpointerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_latest<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 CheckpointId,
) -> Pin<Box<dyn Future<Output = Result<(), CheckpointerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Update the _latest pointer to the given checkpoint.
Sourcefn read_latest<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<CheckpointId>, CheckpointerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn read_latest<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<CheckpointId>, CheckpointerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Read the _latest pointer to find the most recent checkpoint.
Sourcefn list_checkpoints<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<CheckpointId>, CheckpointerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_checkpoints<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<CheckpointId>, CheckpointerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
List all checkpoint IDs (sorted chronologically, oldest first).
Sourcefn delete_checkpoint<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 CheckpointId,
) -> Pin<Box<dyn Future<Output = Result<(), CheckpointerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_checkpoint<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 CheckpointId,
) -> Pin<Box<dyn Future<Output = Result<(), CheckpointerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Delete a checkpoint and all its artifacts.