pub trait MultiRootPublicationStore: Send + Sync {
type Error: Error + Send + Sync + 'static;
// Required methods
fn load(
&self,
operation_id: OperationId,
) -> impl Future<Output = Result<Option<MultiRootPublication>, Self::Error>> + StorageFuture;
fn compare_and_swap(
&self,
operation_id: OperationId,
expected_revision: u64,
replacement: MultiRootPublication,
) -> impl Future<Output = Result<bool, Self::Error>> + StorageFuture;
fn list_operations(
&self,
) -> impl Future<Output = Result<Vec<OperationId>, Self::Error>> + StorageFuture;
fn compare_and_delete(
&self,
operation_id: OperationId,
expected_revision: u64,
) -> impl Future<Output = Result<bool, Self::Error>> + StorageFuture;
fn claim_parent(
&self,
parent_context_id: WorkspaceContextId,
operation_id: OperationId,
) -> impl Future<Output = Result<bool, Self::Error>> + StorageFuture;
fn release_parent(
&self,
parent_context_id: WorkspaceContextId,
operation_id: OperationId,
) -> impl Future<Output = Result<bool, Self::Error>> + StorageFuture;
}Expand description
Durable optimistic store for publication decisions.
Required Associated Types§
Required Methods§
Sourcefn load(
&self,
operation_id: OperationId,
) -> impl Future<Output = Result<Option<MultiRootPublication>, Self::Error>> + StorageFuture
fn load( &self, operation_id: OperationId, ) -> impl Future<Output = Result<Option<MultiRootPublication>, Self::Error>> + StorageFuture
Loads one operation record.
Sourcefn compare_and_swap(
&self,
operation_id: OperationId,
expected_revision: u64,
replacement: MultiRootPublication,
) -> impl Future<Output = Result<bool, Self::Error>> + StorageFuture
fn compare_and_swap( &self, operation_id: OperationId, expected_revision: u64, replacement: MultiRootPublication, ) -> impl Future<Output = Result<bool, Self::Error>> + StorageFuture
Atomically replaces one expected revision; zero creates the record.
Sourcefn list_operations(
&self,
) -> impl Future<Output = Result<Vec<OperationId>, Self::Error>> + StorageFuture
fn list_operations( &self, ) -> impl Future<Output = Result<Vec<OperationId>, Self::Error>> + StorageFuture
Lists durable operations that may require restart recovery.
Sourcefn compare_and_delete(
&self,
operation_id: OperationId,
expected_revision: u64,
) -> impl Future<Output = Result<bool, Self::Error>> + StorageFuture
fn compare_and_delete( &self, operation_id: OperationId, expected_revision: u64, ) -> impl Future<Output = Result<bool, Self::Error>> + StorageFuture
Removes a terminal record only when its exact revision still matches. Failed physical cleanup leaves the record intact for restart recovery.
Sourcefn claim_parent(
&self,
parent_context_id: WorkspaceContextId,
operation_id: OperationId,
) -> impl Future<Output = Result<bool, Self::Error>> + StorageFuture
fn claim_parent( &self, parent_context_id: WorkspaceContextId, operation_id: OperationId, ) -> impl Future<Output = Result<bool, Self::Error>> + StorageFuture
Atomically claims the one publication slot for a parent context.
Sourcefn release_parent(
&self,
parent_context_id: WorkspaceContextId,
operation_id: OperationId,
) -> impl Future<Output = Result<bool, Self::Error>> + StorageFuture
fn release_parent( &self, parent_context_id: WorkspaceContextId, operation_id: OperationId, ) -> impl Future<Output = Result<bool, Self::Error>> + StorageFuture
Releases the exact parent claim after terminal cleanup.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".