Skip to main content

InMemoryCheckpointStore

Struct InMemoryCheckpointStore 

Source
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

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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

Source§

fn save( &self, checkpoint: RunCheckpoint, latest_journal_seq: u64, ) -> Result<CheckpointSaveOutcome, AgentError>

Saves checkpoint accelerator data for a run at a journal sequence. Implementations write or replace checkpoint accelerator data for the run without changing journal truth.
Source§

fn load_latest( &self, run_id: &RunId, ) -> Result<Option<RunCheckpoint>, AgentError>

Loads the latest checkpoint accelerator data for a run. Implementations read checkpoint storage for the requested run and return matching checkpoint data without altering durable journal truth.
Source§

fn load_at_or_before( &self, run_id: &RunId, cursor: &JournalCursor, ) -> Result<Option<RunCheckpoint>, AgentError>

Loads checkpoint accelerator data at or before the requested journal cursor. Implementations read checkpoint storage for the requested run and return matching checkpoint data without altering durable journal truth.
Source§

fn prune( &self, run_id: &RunId, policy: CheckpointPrunePolicy, ) -> Result<CheckpointPruneReport, AgentError>

Prunes checkpoint accelerator data according to retention policy. Implementations remove checkpoint accelerator entries according to retention policy without deleting journal truth.
Source§

impl Clone for InMemoryCheckpointStore

Source§

fn clone(&self) -> InMemoryCheckpointStore

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for InMemoryCheckpointStore

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for InMemoryCheckpointStore

Source§

fn default() -> InMemoryCheckpointStore

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.