pub struct PreparedSessionMaterialization { /* private fields */ }Expand description
Unique, cancellation-safe owner of one prepared session materialization.
Runtime bindings remain cloneable factory data; this lease is deliberately non-clone so rollback ownership can only move between orchestration layers by an explicit Rust move. Dropping an armed lease synchronously fences executor attachment, then schedules exact provisional cleanup/registration rollback.
Implementations§
Source§impl PreparedSessionMaterialization
impl PreparedSessionMaterialization
pub fn bindings(&self) -> &SessionRuntimeBindings
pub fn bindings_clone(&self) -> SessionRuntimeBindings
pub fn session_id(&self) -> &SessionId
Sourcepub async fn owns_current_materialization_claim(&self) -> bool
pub async fn owns_current_materialization_claim(&self) -> bool
Whether this lease still owns the exact process-local materialization claim that fences same-session actor creation and executor attachment.
Mint the non-cloneable authorization for actor construction at an exact Archived+Retired revival midpoint.
The returned token is useful only while this prepared lease still owns the same claim. Consumption revalidates the current machine entry, provisional cleanup installation, and exact Retired phase under the session mutation gate.
Sourcepub async fn acquire_archived_resume_commit_lease(
&self,
) -> Result<PreparedArchivedResumeCommitLease, RuntimeDriverError>
pub async fn acquire_archived_resume_commit_lease( &self, ) -> Result<PreparedArchivedResumeCommitLease, RuntimeDriverError>
Acquire the exact post-actor commit lease for archived revival.
Actor construction must already have consumed the one-shot
authorization and committed the exact claim into
ActorMaterializedPendingCommit.
Sourcepub async fn ensure_executor_attachment<F>(
&mut self,
executor_factory: F,
) -> Result<EnsureRuntimeExecutorAttachment, RuntimeDriverError>
pub async fn ensure_executor_attachment<F>( &mut self, executor_factory: F, ) -> Result<EnsureRuntimeExecutorAttachment, RuntimeDriverError>
Attach the executor that consumes this exact actor-materialization claim. Generic machine attachment is intentionally unable to cross an outstanding prepare/actor-create transaction; this method transfers that authority to the returned pending attachment lease.
Sourcepub async fn rollback_now(&mut self) -> Result<bool, RuntimeDriverError>
pub async fn rollback_now(&mut self) -> Result<bool, RuntimeDriverError>
Roll back this exact materialization now. A pre-existing runtime entry is preserved after its exact provisional cleanup; an entry inserted for this transaction is fully unregistered.
Sourcepub async fn rollback_now_under_turn_finalization_boundary(
&mut self,
) -> Result<bool, RuntimeDriverError>
pub async fn rollback_now_under_turn_finalization_boundary( &mut self, ) -> Result<bool, RuntimeDriverError>
Exact rollback for a caller that already owns the persistent service’s turn-finalization boundary.
Sourcepub async fn commit_staged(&mut self) -> Result<(), RuntimeDriverError>
pub async fn commit_staged(&mut self) -> Result<(), RuntimeDriverError>
Publish a staged-session owner. The staged registry must subsequently retain the exact bindings and call exact rollback when it abandons the slot; actor construction may later consume the same claim.
Sourcepub async fn commit_actor_unattached(
&mut self,
) -> Result<(), RuntimeDriverError>
pub async fn commit_actor_unattached( &mut self, ) -> Result<(), RuntimeDriverError>
Retain a successfully created actor before executor attachment. The provisional cleanup stays on the machine entry for raw unregister, while this transaction can no longer roll the registration back.