pub struct BarrierPollHandle { /* private fields */ }Expand description
Handle used by source operators to poll for pending barriers.
Cloned from CheckpointBarrierInjector::handle and stored in the
source operator. The fast path is a single atomic load.
Implementations§
Source§impl BarrierPollHandle
impl BarrierPollHandle
Sourcepub fn poll(&self, epoch: u64) -> Option<CheckpointBarrier>
pub fn poll(&self, epoch: u64) -> Option<CheckpointBarrier>
Poll for a pending barrier.
Returns Some(CheckpointBarrier) if a barrier is pending and
this call successfully claimed it (exactly-once delivery across
handles sharing the same injector). Returns None if no barrier
is pending or another handle already claimed it.
The epoch parameter is supplied by the caller (typically the
source operator’s current epoch) and is embedded in the returned
barrier. The injector does not encode the epoch in the atomic
command word — only checkpoint ID and flags are packed.
§Performance
Fast path (no barrier): single load(Relaxed) — < 10ns.
Slow path (barrier pending): one compare_exchange.
Trait Implementations§
Source§impl Clone for BarrierPollHandle
impl Clone for BarrierPollHandle
Source§fn clone(&self) -> BarrierPollHandle
fn clone(&self) -> BarrierPollHandle
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for BarrierPollHandle
impl RefUnwindSafe for BarrierPollHandle
impl Send for BarrierPollHandle
impl Sync for BarrierPollHandle
impl Unpin for BarrierPollHandle
impl UnsafeUnpin for BarrierPollHandle
impl UnwindSafe for BarrierPollHandle
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more