pub struct InMemoryCheckpointStore { /* private fields */ }Expand description
Holds in memory checkpoint store application-layer state or configuration. Use it with the documented coordinator methods; run, journal, event, provider, or port effects are called out on those methods rather than on construction.
Implementations§
Source§impl InMemoryCheckpointStore
impl InMemoryCheckpointStore
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new application::checkpoint value with explicit caller-provided inputs. This constructor is data-only and performs no I/O or external side effects.
Sourcepub fn save(
&self,
checkpoint: RunCheckpoint,
latest_journal_seq: u64,
) -> Result<CheckpointSaveOutcome, AgentError>
pub fn save( &self, checkpoint: RunCheckpoint, latest_journal_seq: u64, ) -> Result<CheckpointSaveOutcome, AgentError>
Save. This stores checkpoint accelerator data in memory without changing journal truth.
Sourcepub fn load_latest(
&self,
run_id: &RunId,
) -> Result<Option<RunCheckpoint>, AgentError>
pub fn load_latest( &self, run_id: &RunId, ) -> Result<Option<RunCheckpoint>, AgentError>
Load latest. This reads the in-memory checkpoint store for the requested run and does not write checkpoints or journal records.
Sourcepub fn load_at_or_before(
&self,
run_id: &RunId,
cursor: &JournalCursor,
) -> Result<Option<RunCheckpoint>, AgentError>
pub fn load_at_or_before( &self, run_id: &RunId, cursor: &JournalCursor, ) -> Result<Option<RunCheckpoint>, AgentError>
Load at or before. This reads the in-memory checkpoint store for the requested run and does not write checkpoints or journal records.
Sourcepub fn prune(
&self,
run_id: &RunId,
policy: CheckpointPrunePolicy,
) -> Result<CheckpointPruneReport, AgentError>
pub fn prune( &self, run_id: &RunId, policy: CheckpointPrunePolicy, ) -> Result<CheckpointPruneReport, AgentError>
Prune. This prunes only the in-memory checkpoint accelerator and leaves durable journal records untouched.
Sourcepub fn list(&self, run_id: &RunId) -> Result<Vec<RunCheckpoint>, AgentError>
pub fn list(&self, run_id: &RunId) -> Result<Vec<RunCheckpoint>, AgentError>
List. This reads all in-memory checkpoint accelerator entries for one run.
Trait Implementations§
Source§impl CheckpointStore for InMemoryCheckpointStore
impl CheckpointStore for InMemoryCheckpointStore
Source§fn save(
&self,
checkpoint: RunCheckpoint,
latest_journal_seq: u64,
) -> Result<CheckpointSaveOutcome, AgentError>
fn save( &self, checkpoint: RunCheckpoint, latest_journal_seq: u64, ) -> Result<CheckpointSaveOutcome, AgentError>
Source§fn load_latest(
&self,
run_id: &RunId,
) -> Result<Option<RunCheckpoint>, AgentError>
fn load_latest( &self, run_id: &RunId, ) -> Result<Option<RunCheckpoint>, AgentError>
Source§fn load_at_or_before(
&self,
run_id: &RunId,
cursor: &JournalCursor,
) -> Result<Option<RunCheckpoint>, AgentError>
fn load_at_or_before( &self, run_id: &RunId, cursor: &JournalCursor, ) -> Result<Option<RunCheckpoint>, AgentError>
Source§fn prune(
&self,
run_id: &RunId,
policy: CheckpointPrunePolicy,
) -> Result<CheckpointPruneReport, AgentError>
fn prune( &self, run_id: &RunId, policy: CheckpointPrunePolicy, ) -> Result<CheckpointPruneReport, AgentError>
Source§impl Clone for InMemoryCheckpointStore
impl Clone for InMemoryCheckpointStore
Source§fn clone(&self) -> InMemoryCheckpointStore
fn clone(&self) -> InMemoryCheckpointStore
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more