pub struct RuntimeOpsLifecycleRegistry { /* private fields */ }Expand description
Per-runtime shared registry for async operation lifecycle truth.
Per-operation canonical lifecycle state is owned by the DSL authority embedded in the shell. This struct manages I/O concerns: watcher channels, timestamps, peer handles, snapshot assembly, FIFO eviction, and the completion feed buffer.
Implementations§
Source§impl RuntimeOpsLifecycleRegistry
impl RuntimeOpsLifecycleRegistry
pub fn new() -> Self
pub fn with_config(config: OpsLifecycleConfig) -> Self
Sourcepub fn set_persistence_channel(
&self,
tx: UnboundedSender<OpsLifecyclePersistenceRequest>,
epoch_id: RuntimeEpochId,
cursor_state: Arc<EpochCursorState>,
)
pub fn set_persistence_channel( &self, tx: UnboundedSender<OpsLifecyclePersistenceRequest>, epoch_id: RuntimeEpochId, cursor_state: Arc<EpochCursorState>, )
Wire a persistence channel for durable snapshot writes.
After this call, terminal transitions (complete/fail/cancel/abort) capture a snapshot and queue it to the channel. A dedicated persistence task should drain the channel and write to the store.
Sourcepub fn from_recovered(
snapshot: PersistedOpsSnapshot,
) -> Result<Self, OpsLifecycleError>
pub fn from_recovered( snapshot: PersistedOpsSnapshot, ) -> Result<Self, OpsLifecycleError>
Recover from a persisted snapshot.
Rebuilds DSL state (stripping non-terminal ops — only terminals survive recovery), creates fresh shell records from specs, and seeds the feed buffer only with completion entries accepted by generated recovery authority.
Sourcepub fn capture_persistence_snapshot(
&self,
epoch_id: RuntimeEpochId,
cursor_state: &EpochCursorState,
) -> Result<PersistedOpsSnapshot, OpsLifecycleError>
pub fn capture_persistence_snapshot( &self, epoch_id: RuntimeEpochId, cursor_state: &EpochCursorState, ) -> Result<PersistedOpsSnapshot, OpsLifecycleError>
Capture a serializable snapshot of the current state for persistence.
Includes authority state, operation specs, completion entries, and generated completion-consumer cursor values.
Sourcepub fn completion_cursor_snapshot(&self) -> EpochCursorSnapshot
pub fn completion_cursor_snapshot(&self) -> EpochCursorSnapshot
Snapshot generated completion-consumer cursor state.
Sourcepub fn completion_feed_handle(&self) -> Arc<dyn CompletionFeed> ⓘ
pub fn completion_feed_handle(&self) -> Arc<dyn CompletionFeed> ⓘ
Return a read handle to the completion feed.