pub struct MaterializingWorkspaceMultiRootPublisher<A, O, R, M> { /* private fields */ }Expand description
Workspace publisher composed with an injected physical materializer.
Logical publication happens first under the durable all-roots decision. If materialization is interrupted, retry discovers the exact generation from the workspace idempotency record and resumes the same materializer.
Implementations§
Source§impl<A, O, R, M> MaterializingWorkspaceMultiRootPublisher<A, O, R, M>
impl<A, O, R, M> MaterializingWorkspaceMultiRootPublisher<A, O, R, M>
Sourcepub fn new(resolver: R, materializer: M) -> Self
pub fn new(resolver: R, materializer: M) -> Self
Creates one composed logical and physical publisher.
Sourcepub fn with_merge_drivers(self, registry: Arc<MergeDriverRegistry>) -> Self
pub fn with_merge_drivers(self, registry: Arc<MergeDriverRegistry>) -> Self
Uses one immutable-input driver registry for conflict resolution.
Sourcepub fn with_root_merge_drivers(
self,
root_id: WorkspaceRootId,
registry: Arc<MergeDriverRegistry>,
) -> Self
pub fn with_root_merge_drivers( self, root_id: WorkspaceRootId, registry: Arc<MergeDriverRegistry>, ) -> Self
Overrides merge-driver selection for one root in a multi-root plan.
Trait Implementations§
Source§impl<A, O, R, M> MultiRootPublisher for MaterializingWorkspaceMultiRootPublisher<A, O, R, M>where
A: AsyncAuthorityStore,
O: AsyncObjectStore,
R: WorkspaceResolver<A, O>,
M: MultiRootMaterializer<A, O>,
impl<A, O, R, M> MultiRootPublisher for MaterializingWorkspaceMultiRootPublisher<A, O, R, M>where
A: AsyncAuthorityStore,
O: AsyncObjectStore,
R: WorkspaceResolver<A, O>,
M: MultiRootMaterializer<A, O>,
Source§type Error = MaterializingWorkspaceMultiRootPublisherError<<R as WorkspaceResolver<A, O>>::Error, <M as MultiRootMaterializer<A, O>>::Error>
type Error = MaterializingWorkspaceMultiRootPublisherError<<R as WorkspaceResolver<A, O>>::Error, <M as MultiRootMaterializer<A, O>>::Error>
Publisher error.
Source§async fn prepare(
&self,
operation_id: OperationId,
root_id: WorkspaceRootId,
root: &MultiRootMergeRoot,
resolutions: &BTreeMap<ConflictKey, MergeResolution>,
) -> Result<MultiRootPrepare, Self::Error>
async fn prepare( &self, operation_id: OperationId, root_id: WorkspaceRootId, root: &MultiRootMergeRoot, resolutions: &BTreeMap<ConflictKey, MergeResolution>, ) -> Result<MultiRootPrepare, Self::Error>
Atomically validates and reserves the exact pinned target. Repeating
this call for one operation must return the same live reservation.
Source§async fn release(
&self,
operation_id: OperationId,
root_id: WorkspaceRootId,
fence: &MultiRootFence,
) -> Result<(), Self::Error>
async fn release( &self, operation_id: OperationId, root_id: WorkspaceRootId, fence: &MultiRootFence, ) -> Result<(), Self::Error>
Releases a reservation when validation fails before a commit decision.
Source§async fn project_conflict(
&self,
operation_id: OperationId,
root_id: WorkspaceRootId,
root: &MultiRootMergeRoot,
conflict: Option<&MergePlan>,
) -> Result<GenerationId, Self::Error>
async fn project_conflict( &self, operation_id: OperationId, root_id: WorkspaceRootId, root: &MultiRootMergeRoot, conflict: Option<&MergePlan>, ) -> Result<GenerationId, Self::Error>
Projects one root into its durable conflicted working state.
Source§async fn abort_conflict(
&self,
operation_id: OperationId,
root_id: WorkspaceRootId,
root: &MultiRootMergeRoot,
projected_generation: GenerationId,
) -> Result<GenerationId, Self::Error>
async fn abort_conflict( &self, operation_id: OperationId, root_id: WorkspaceRootId, root: &MultiRootMergeRoot, projected_generation: GenerationId, ) -> Result<GenerationId, Self::Error>
Restores one projected root to its exact pre-merge generation.
Source§async fn declare_conflicts(
&self,
operation_id: OperationId,
root_id: WorkspaceRootId,
root: &MultiRootMergeRoot,
conflict: &MergePlan,
paths: &[String],
) -> Result<BTreeSet<ConflictKey>, Self::Error>
async fn declare_conflicts( &self, operation_id: OperationId, root_id: WorkspaceRootId, root: &MultiRootMergeRoot, conflict: &MergePlan, paths: &[String], ) -> Result<BTreeSet<ConflictKey>, Self::Error>
Validates explicitly staged conflict paths and returns their exact keys.
Source§async fn finish_conflict(
&self,
operation_id: OperationId,
root_id: WorkspaceRootId,
root: &MultiRootMergeRoot,
projected_generation: GenerationId,
) -> Result<MultiRootConflictFinish, Self::Error>
async fn finish_conflict( &self, operation_id: OperationId, root_id: WorkspaceRootId, root: &MultiRootMergeRoot, projected_generation: GenerationId, ) -> Result<MultiRootConflictFinish, Self::Error>
Captures the current resolved working generation during continue.
Source§async fn publish(
&self,
operation_id: OperationId,
root_id: WorkspaceRootId,
root: &MultiRootMergeRoot,
resolutions: &BTreeMap<ConflictKey, MergeResolution>,
fence: &MultiRootFence,
) -> Result<MultiRootPublishRoot, Self::Error>
async fn publish( &self, operation_id: OperationId, root_id: WorkspaceRootId, root: &MultiRootMergeRoot, resolutions: &BTreeMap<ConflictKey, MergeResolution>, fence: &MultiRootFence, ) -> Result<MultiRootPublishRoot, Self::Error>
Idempotently rolls one root forward after the durable commit decision.
Source§async fn finalize(
&self,
operation_id: OperationId,
root_id: WorkspaceRootId,
_root: &MultiRootMergeRoot,
) -> Result<(), Self::Error>
async fn finalize( &self, operation_id: OperationId, root_id: WorkspaceRootId, _root: &MultiRootMergeRoot, ) -> Result<(), Self::Error>
Reclaims terminal per-root recovery state after the all-roots Applied
decision is durable. It must be idempotent because restart recovery
retries cleanup independently of logical publication.
Auto Trait Implementations§
impl<A, O, R, M> !Freeze for MaterializingWorkspaceMultiRootPublisher<A, O, R, M>
impl<A, O, R, M> !RefUnwindSafe for MaterializingWorkspaceMultiRootPublisher<A, O, R, M>
impl<A, O, R, M> !UnwindSafe for MaterializingWorkspaceMultiRootPublisher<A, O, R, M>
impl<A, O, R, M> Send for MaterializingWorkspaceMultiRootPublisher<A, O, R, M>
impl<A, O, R, M> Sync for MaterializingWorkspaceMultiRootPublisher<A, O, R, M>
impl<A, O, R, M> Unpin for MaterializingWorkspaceMultiRootPublisher<A, O, R, M>
impl<A, O, R, M> UnsafeUnpin for MaterializingWorkspaceMultiRootPublisher<A, O, R, M>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request