pub trait SessionExecutionLeaseStore: Send + Sync {
// Required methods
fn try_claim_session_execution_lease<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
owner: &'life2 LeaseOwnerIdentity,
lease_ttl_ms: u64,
) -> Pin<Box<dyn Future<Output = Result<SessionExecutionLeaseClaimOutcome, StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait;
fn reclaim_session_execution_lease<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
owner: &'life2 LeaseOwnerIdentity,
observed_holder: &'life3 SessionExecutionLeaseFence,
lease_ttl_ms: u64,
) -> Pin<Box<dyn Future<Output = Result<SessionExecutionLeaseClaimOutcome, StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait;
fn renew_session_execution_lease<'life0, 'life1, 'async_trait>(
&'life0 self,
fence: &'life1 SessionExecutionLeaseFence,
lease_ttl_ms: u64,
) -> Pin<Box<dyn Future<Output = Result<SessionExecutionLease, StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn release_session_execution_lease<'life0, 'life1, 'async_trait>(
&'life0 self,
completion: &'life1 SessionExecutionLeaseCompletion,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
}Expand description
Durable single-writer execution-lane capability, fenced by monotonic fencing tokens.
Required Methods§
Sourcefn try_claim_session_execution_lease<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
owner: &'life2 LeaseOwnerIdentity,
lease_ttl_ms: u64,
) -> Pin<Box<dyn Future<Output = Result<SessionExecutionLeaseClaimOutcome, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn try_claim_session_execution_lease<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
owner: &'life2 LeaseOwnerIdentity,
lease_ttl_ms: u64,
) -> Pin<Box<dyn Future<Output = Result<SessionExecutionLeaseClaimOutcome, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Try to claim the durable single-writer execution lane for session_id.
Returns SessionExecutionLeaseClaimOutcome::Busy when another owner
holds an unexpired lease. Expired or released leases may be reclaimed
and receive a higher fencing token. An unexpired lease held by the same
owner id but a different incarnation is busy.
Sourcefn reclaim_session_execution_lease<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
owner: &'life2 LeaseOwnerIdentity,
observed_holder: &'life3 SessionExecutionLeaseFence,
lease_ttl_ms: u64,
) -> Pin<Box<dyn Future<Output = Result<SessionExecutionLeaseClaimOutcome, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
fn reclaim_session_execution_lease<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
owner: &'life2 LeaseOwnerIdentity,
observed_holder: &'life3 SessionExecutionLeaseFence,
lease_ttl_ms: u64,
) -> Pin<Box<dyn Future<Output = Result<SessionExecutionLeaseClaimOutcome, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
Reclaim an unexpired session execution lease whose observed holder is definitely dead according to persisted local-process liveness metadata.
Backends must CAS on observed_holder so a stale claimant cannot clear
a newer live lease that won the race after the busy observation.
Sourcefn renew_session_execution_lease<'life0, 'life1, 'async_trait>(
&'life0 self,
fence: &'life1 SessionExecutionLeaseFence,
lease_ttl_ms: u64,
) -> Pin<Box<dyn Future<Output = Result<SessionExecutionLease, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn renew_session_execution_lease<'life0, 'life1, 'async_trait>(
&'life0 self,
fence: &'life1 SessionExecutionLeaseFence,
lease_ttl_ms: u64,
) -> Pin<Box<dyn Future<Output = Result<SessionExecutionLease, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Extend a live session execution lease owned by the caller.
Backends must reject stale, released, superseded, or expired fences with
StoreError::SessionExecutionLeaseExpired.
Sourcefn release_session_execution_lease<'life0, 'life1, 'async_trait>(
&'life0 self,
completion: &'life1 SessionExecutionLeaseCompletion,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn release_session_execution_lease<'life0, 'life1, 'async_trait>(
&'life0 self,
completion: &'life1 SessionExecutionLeaseCompletion,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Release a session execution lease fenced by its completion token.
This operation is idempotent and must not clear a newer owner’s lease.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".