Skip to main content

LocalCoreStateStore

Struct LocalCoreStateStore 

Source
pub struct LocalCoreStateStore { /* private fields */ }
Expand description

One journaled private namespace shared by core control-plane state.

Implementations§

Source§

impl LocalCoreStateStore

Source

pub fn new(root: impl Into<PathBuf>) -> Self

Opens a private companion namespace below root.

Directories are created lazily on first mutation.

Source

pub fn root(&self) -> &Path

Returns the namespace root.

Source

pub async fn materialization_operations_async( &self, ) -> Result<Vec<OperationId>, LocalCoreStateStoreError>

Lists durable materialization journals without blocking an async executor.

Source

pub async fn remove_materialization_async( &self, operation_id: OperationId, ) -> Result<(), LocalCoreStateStoreError>

Removes a terminal journal without blocking an async executor.

Trait Implementations§

Source§

impl Clone for LocalCoreStateStore

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for LocalCoreStateStore

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl GitCompatStore for LocalCoreStateStore

Source§

type Error = LocalCoreStateStoreError

Adapter error.
Source§

async fn load( &self, workspace_id: WorkspaceId, ) -> Result<Option<GitCompatState>, Self::Error>

Loads state for one repository/workspace identity.
Source§

async fn compare_and_swap( &self, workspace_id: WorkspaceId, expected_revision: u64, replacement: GitCompatState, ) -> Result<bool, Self::Error>

Atomically replaces one expected revision. Revision zero creates state.
Source§

async fn compare_and_delete( &self, workspace_id: WorkspaceId, expected_revision: u64, ) -> Result<bool, Self::Error>

Atomically removes one exact compatibility-state revision.
Source§

impl LazyWorkspaceStore for LocalCoreStateStore

Source§

type Error = LocalCoreStateStoreError

Backend error.
Source§

fn load_lazy_workspace<'life0, 'async_trait>( &'life0 self, workspace_id: WorkspaceId, ) -> Pin<Box<dyn Future<Output = Result<Option<LazyWorkspaceState>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Loads one workspace binding.
Source§

fn compare_and_swap_lazy_workspace<'life0, 'async_trait>( &'life0 self, workspace_id: WorkspaceId, expected_revision: u64, replacement: LazyWorkspaceState, ) -> Pin<Box<dyn Future<Output = Result<bool, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Replaces one binding only at the expected revision (0 means absent).
Source§

fn load_lazy_overlay<'life0, 'async_trait>( &'life0 self, overlay: LazyOverlayId, ) -> Pin<Box<dyn Future<Output = Result<Option<LazyOverlay>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Loads an immutable content-addressed overlay.
Source§

fn put_lazy_overlay<'life0, 'async_trait>( &'life0 self, overlay: LazyOverlayId, value: LazyOverlay, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Stores an immutable overlay, idempotently rejecting digest mismatches.
Source§

fn load_lazy_shadow<'life0, 'async_trait>( &'life0 self, shadow: LazyShadowId, ) -> Pin<Box<dyn Future<Output = Result<Option<LazyShadow>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Loads one immutable source-identity shadow node.
Source§

fn put_lazy_shadow<'life0, 'async_trait>( &'life0 self, shadow: LazyShadowId, value: LazyShadow, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Stores one immutable source-identity shadow node.
Source§

fn load_lazy_workspace_measured<'life0, 'life1, 'async_trait>( &'life0 self, workspace_id: WorkspaceId, budget: WorkBudget, cancellation: &'life1 CancellationToken, ) -> Pin<Box<dyn Future<Output = Result<OperationReceipt<Option<LazyWorkspaceState>>, LazyWorkspaceError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Loads one binding under an explicit logical durable-read budget.
Source§

fn compare_and_swap_lazy_workspace_measured<'life0, 'life1, 'async_trait>( &'life0 self, workspace_id: WorkspaceId, expected_revision: u64, replacement: LazyWorkspaceState, budget: WorkBudget, cancellation: &'life1 CancellationToken, ) -> Pin<Box<dyn Future<Output = Result<OperationReceipt<bool>, LazyWorkspaceError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Replaces one binding under an explicit logical durable-write budget.
Source§

fn load_lazy_overlay_measured<'life0, 'life1, 'async_trait>( &'life0 self, overlay: LazyOverlayId, budget: WorkBudget, cancellation: &'life1 CancellationToken, ) -> Pin<Box<dyn Future<Output = Result<OperationReceipt<Option<LazyOverlay>>, LazyWorkspaceError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Loads one immutable overlay under an explicit logical read budget.
Source§

fn load_lazy_shadow_measured<'life0, 'life1, 'async_trait>( &'life0 self, shadow: LazyShadowId, budget: WorkBudget, cancellation: &'life1 CancellationToken, ) -> Pin<Box<dyn Future<Output = Result<OperationReceipt<Option<LazyShadow>>, LazyWorkspaceError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Loads one immutable shadow under an explicit logical read budget.
Source§

impl MaterializationJournalStore for LocalCoreStateStore

Source§

type Error = LocalCoreStateStoreError

Adapter error.
Source§

async fn load( &self, operation_id: OperationId, ) -> Result<Option<MaterializationJournal>, Self::Error>

Loads one operation journal.
Source§

async fn compare_and_swap( &self, operation_id: OperationId, expected_revision: u64, replacement: MaterializationJournal, ) -> Result<bool, Self::Error>

Atomically replaces expected_revision; zero creates a journal.
Source§

impl MultiRootPublicationStore for LocalCoreStateStore

Source§

type Error = LocalCoreStateStoreError

Adapter error.
Source§

async fn load( &self, operation_id: OperationId, ) -> Result<Option<MultiRootPublication>, Self::Error>

Loads one operation record.
Source§

async fn compare_and_swap( &self, operation_id: OperationId, expected_revision: u64, replacement: MultiRootPublication, ) -> Result<bool, Self::Error>

Atomically replaces one expected revision; zero creates the record.
Source§

async fn list_operations(&self) -> Result<Vec<OperationId>, Self::Error>

Lists durable operations that may require restart recovery.
Source§

async fn compare_and_delete( &self, operation_id: OperationId, expected_revision: u64, ) -> Result<bool, Self::Error>

Removes a terminal record only when its exact revision still matches. Failed physical cleanup leaves the record intact for restart recovery.
Source§

async fn claim_parent( &self, parent_context_id: WorkspaceContextId, operation_id: OperationId, ) -> Result<bool, Self::Error>

Atomically claims the one publication slot for a parent context.
Source§

async fn release_parent( &self, parent_context_id: WorkspaceContextId, operation_id: OperationId, ) -> Result<bool, Self::Error>

Releases the exact parent claim after terminal cleanup.
Source§

impl WorkspaceContextStore for LocalCoreStateStore

Source§

type Error = LocalCoreStateStoreError

Adapter error.
Source§

async fn load( &self, context_id: WorkspaceContextId, ) -> Result<Option<WorkspaceContext>, Self::Error>

Loads one context, if registered.
Source§

async fn list(&self) -> Result<Vec<WorkspaceContext>, Self::Error>

Lists all durable contexts. Records are small and this is used only for routing, recursive discard, and recovery—not filesystem indexing.
Source§

async fn compare_and_swap( &self, context_id: WorkspaceContextId, expected_revision: u64, replacement: WorkspaceContext, ) -> Result<bool, Self::Error>

Atomically replaces expected_revision; zero creates a context.
Source§

async fn compare_and_swap_many( &self, expected_revisions: BTreeMap<WorkspaceContextId, u64>, replacements: Vec<WorkspaceContext>, require_exact_set: bool, ) -> Result<bool, Self::Error>

Atomically verifies every listed revision and replaces the supplied records. Expected revision zero means that context must be absent.
Source§

async fn discard_subtree( &self, parent: WorkspaceContextId, child: WorkspaceContextId, maximum: u32, ) -> Result<WorkspaceContextDiscardOutcome, Self::Error>

Atomically validates and tombstones one direct-child subtree.
Source§

impl WorkspaceLineageStore for LocalCoreStateStore

Source§

type Error = LocalCoreStateStoreError

Adapter error.
Source§

async fn load( &self, workspace_id: WorkspaceId, ) -> Result<Option<WorkspaceLineageRecord>, Self::Error>

Loads the record for one workspace, if registered.
Source§

async fn compare_and_swap( &self, workspace_id: WorkspaceId, expected_revision: u64, replacement: WorkspaceLineageRecord, ) -> Result<bool, Self::Error>

Atomically replaces expected_revision; zero creates a record.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<L> LayerExt<L> for L

Source§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in Layered.
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> StorageFuture for T
where T: Send,

Source§

impl<T> StorageProvider for T
where T: Send + Sync + ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more