pub struct StreamOperationWindowStore<P> { /* private fields */ }Expand description
Operation-window state stored beside generation authority in one Stream provider. Each lease owns an immutable gate stream: opening creates tail 1, while close/expiry atomically advances it to tail 2 with the window CAS. A generation publication conditioned on tail 1 therefore linearizes exactly against fencing.
Implementations§
Trait Implementations§
Source§impl<P: Clone> Clone for StreamOperationWindowStore<P>
impl<P: Clone> Clone for StreamOperationWindowStore<P>
Source§impl<P: StreamProvider> OperationWindowStore for StreamOperationWindowStore<P>
impl<P: StreamProvider> OperationWindowStore for StreamOperationWindowStore<P>
Source§type Error = StreamOperationWindowStoreError
type Error = StreamOperationWindowStoreError
Adapter error.
Source§async fn load(
&self,
workspace_id: WorkspaceId,
) -> Result<Option<OperationWindowSnapshot>, Self::Error>
async fn load( &self, workspace_id: WorkspaceId, ) -> Result<Option<OperationWindowSnapshot>, Self::Error>
Loads current state, returning
None before first use.Source§async fn compare_and_swap(
&self,
workspace_id: WorkspaceId,
expected_revision: u64,
replacement: OperationWindowSnapshot,
) -> Result<bool, Self::Error>
async fn compare_and_swap( &self, workspace_id: WorkspaceId, expected_revision: u64, replacement: OperationWindowSnapshot, ) -> Result<bool, Self::Error>
Replaces
expected_revision atomically. Revision zero creates state.Auto Trait Implementations§
impl<P> Freeze for StreamOperationWindowStore<P>
impl<P> RefUnwindSafe for StreamOperationWindowStore<P>where
Arc<P>: RefUnwindSafe,
impl<P> Send for StreamOperationWindowStore<P>
impl<P> Sync for StreamOperationWindowStore<P>
impl<P> Unpin for StreamOperationWindowStore<P>
impl<P> UnsafeUnpin for StreamOperationWindowStore<P>where
Arc<P>: UnsafeUnpin,
impl<P> UnwindSafe for StreamOperationWindowStore<P>where
Arc<P>: UnwindSafe,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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