pub struct ThreadSafeCheckpointManager { /* private fields */ }Expand description
Thread-safe checkpoint manager
Wraps operations in Mutex for concurrent access
Implementations§
Source§impl ThreadSafeCheckpointManager
impl ThreadSafeCheckpointManager
Sourcepub fn new(storage: ThreadSafeStorage, session_id: SessionId) -> Self
pub fn new(storage: ThreadSafeStorage, session_id: SessionId) -> Self
Create a new thread-safe manager
Sourcepub fn checkpoint(&self, message: impl Into<String>) -> Result<CheckpointId>
pub fn checkpoint(&self, message: impl Into<String>) -> Result<CheckpointId>
Create a manual checkpoint with auto-generated sequence
Sourcepub fn checkpoint_with_sequence(
&self,
message: impl Into<String>,
sequence: u64,
) -> Result<CheckpointId>
pub fn checkpoint_with_sequence( &self, message: impl Into<String>, sequence: u64, ) -> Result<CheckpointId>
Create a checkpoint with a specific sequence number (for global sequencing)
Create a checkpoint with tags and auto-generated sequence
Create a checkpoint with tags and specific sequence number
Sourcepub fn auto_checkpoint(
&self,
trigger: AutoTrigger,
) -> Result<Option<CheckpointId>>
pub fn auto_checkpoint( &self, trigger: AutoTrigger, ) -> Result<Option<CheckpointId>>
Create an automatic checkpoint with auto-generated sequence
Sourcepub fn auto_checkpoint_with_sequence(
&self,
trigger: AutoTrigger,
sequence: u64,
) -> Result<Option<CheckpointId>>
pub fn auto_checkpoint_with_sequence( &self, trigger: AutoTrigger, sequence: u64, ) -> Result<Option<CheckpointId>>
Create an automatic checkpoint with specific sequence number
Sourcepub fn list(&self) -> Result<Vec<CheckpointSummary>>
pub fn list(&self) -> Result<Vec<CheckpointSummary>>
List all checkpoints for this session
Sourcepub fn get(&self, id: &CheckpointId) -> Result<Option<TemporalCheckpoint>>
pub fn get(&self, id: &CheckpointId) -> Result<Option<TemporalCheckpoint>>
Get a checkpoint by ID
Sourcepub fn list_by_session(
&self,
session_id: &SessionId,
) -> Result<Vec<CheckpointSummary>>
pub fn list_by_session( &self, session_id: &SessionId, ) -> Result<Vec<CheckpointSummary>>
List checkpoints for a specific session
Sourcepub fn list_by_tag(&self, tag: &str) -> Result<Vec<CheckpointSummary>>
pub fn list_by_tag(&self, tag: &str) -> Result<Vec<CheckpointSummary>>
List checkpoints with a specific tag
Sourcepub fn delete(&self, id: &CheckpointId) -> Result<()>
pub fn delete(&self, id: &CheckpointId) -> Result<()>
Delete a checkpoint
Sourcepub fn compact_with_policy(&self, policy: CompactionPolicy) -> Result<usize>
pub fn compact_with_policy(&self, policy: CompactionPolicy) -> Result<usize>
Compact with policy
Sourcepub fn restore(
&self,
checkpoint: &TemporalCheckpoint,
) -> Result<DebugStateSnapshot>
pub fn restore( &self, checkpoint: &TemporalCheckpoint, ) -> Result<DebugStateSnapshot>
Restore state from checkpoint
Sourcepub fn get_summary(
&self,
id: &CheckpointId,
) -> Result<Option<CheckpointSummary>>
pub fn get_summary( &self, id: &CheckpointId, ) -> Result<Option<CheckpointSummary>>
Get summary by ID
Trait Implementations§
impl Send for ThreadSafeCheckpointManager
impl Sync for ThreadSafeCheckpointManager
Auto Trait Implementations§
impl !Freeze for ThreadSafeCheckpointManager
impl RefUnwindSafe for ThreadSafeCheckpointManager
impl Unpin for ThreadSafeCheckpointManager
impl UnsafeUnpin for ThreadSafeCheckpointManager
impl UnwindSafe for ThreadSafeCheckpointManager
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more