pub struct CheckpointManager { /* private fields */ }Expand description
Manages checkpoints for a single execution.
Implementations§
Source§impl CheckpointManager
impl CheckpointManager
Sourcepub fn initialize(&mut self, payload: &str) -> OperationEvents
pub fn initialize(&mut self, payload: &str) -> OperationEvents
Initialize with the first operation (EXECUTION type).
Sourcepub fn get_operation_data(&self, operation_id: &str) -> Option<&OperationEvents>
pub fn get_operation_data(&self, operation_id: &str) -> Option<&OperationEvents>
Get operation data by ID.
Sourcepub fn get_all_operation_data(&self) -> &HashMap<String, OperationEvents>
pub fn get_all_operation_data(&self) -> &HashMap<String, OperationEvents>
Get all operation data.
Sourcepub fn has_dirty_operations(&self) -> bool
pub fn has_dirty_operations(&self) -> bool
Check if there are dirty operations.
Sourcepub fn get_dirty_operations(&mut self) -> Vec<Operation>
pub fn get_dirty_operations(&mut self) -> Vec<Operation>
Get and clear dirty operations.
Sourcepub fn is_execution_completed(&self) -> bool
pub fn is_execution_completed(&self) -> bool
Check if execution is completed.
Sourcepub fn start_invocation(&mut self, invocation_id: &str) -> Vec<OperationEvents>
pub fn start_invocation(&mut self, invocation_id: &str) -> Vec<OperationEvents>
Start an invocation.
Sourcepub fn complete_invocation(
&mut self,
invocation_id: &str,
) -> Result<InvocationTimestamps, TestError>
pub fn complete_invocation( &mut self, invocation_id: &str, ) -> Result<InvocationTimestamps, TestError>
Complete an invocation.
Sourcepub fn get_state(&self) -> Vec<Operation>
pub fn get_state(&self) -> Vec<Operation>
Get current state (all operations in insertion order).
Sourcepub fn process_checkpoint(
&mut self,
updates: Vec<OperationUpdate>,
) -> Result<Vec<Operation>, TestError>
pub fn process_checkpoint( &mut self, updates: Vec<OperationUpdate>, ) -> Result<Vec<Operation>, TestError>
Process a checkpoint with operation updates.
Sourcepub fn callback_manager(&self) -> &CallbackManager
pub fn callback_manager(&self) -> &CallbackManager
Get the callback manager.
Sourcepub fn callback_manager_mut(&mut self) -> &mut CallbackManager
pub fn callback_manager_mut(&mut self) -> &mut CallbackManager
Get mutable callback manager.
Sourcepub fn complete_callback_operation(
&mut self,
callback_id: &str,
result: Option<String>,
error: Option<ErrorObject>,
)
pub fn complete_callback_operation( &mut self, callback_id: &str, result: Option<String>, error: Option<ErrorObject>, )
Complete a callback operation by updating its status and result/error.
Finds the operation whose callback_details.callback_id matches the given
callback_id and transitions it to Succeeded (with result) or Failed
(with error). This is called when an external system sends a callback
response via the CallbackManager.
Sourcepub fn event_processor(&self) -> &EventProcessor
pub fn event_processor(&self) -> &EventProcessor
Get the event processor.
Sourcepub fn event_processor_mut(&mut self) -> &mut EventProcessor
pub fn event_processor_mut(&mut self) -> &mut EventProcessor
Get mutable event processor.
Sourcepub fn get_history_events(&self) -> Vec<HistoryEvent>
pub fn get_history_events(&self) -> Vec<HistoryEvent>
Get all history events.
Sourcepub fn get_nodejs_history_events(&self) -> Vec<NodeJsHistoryEvent>
pub fn get_nodejs_history_events(&self) -> Vec<NodeJsHistoryEvent>
Get all Node.js-compatible history events.
Returns a vector of events in the Node.js SDK compatible format, suitable for cross-SDK history comparison.
Sourcepub fn execution_id(&self) -> &str
pub fn execution_id(&self) -> &str
Get the execution ID.
Sourcepub fn update_operation_data(
&mut self,
operation_id: &str,
updated_operation: Operation,
)
pub fn update_operation_data( &mut self, operation_id: &str, updated_operation: Operation, )
Update operation data directly.
This method is used by the orchestrator to update operation state (e.g., marking wait operations as SUCCEEDED after time advancement).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CheckpointManager
impl RefUnwindSafe for CheckpointManager
impl Send for CheckpointManager
impl Sync for CheckpointManager
impl Unpin for CheckpointManager
impl UnsafeUnpin for CheckpointManager
impl UnwindSafe for CheckpointManager
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
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>
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>
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