pub struct CheckpointBarrierInjector { /* private fields */ }Expand description
Cross-thread barrier injector for source operators.
The coordinator thread stores a packed barrier command via
trigger. Source operators poll via
BarrierPollHandle::poll on each iteration of their event loop.
§Fast Path
The poll path is a single AtomicU64::load(Relaxed) — typically < 10ns.
Only when a barrier is pending does the source perform a compare-exchange
to claim it.
Implementations§
Source§impl CheckpointBarrierInjector
impl CheckpointBarrierInjector
Sourcepub fn handle(&self) -> BarrierPollHandle
pub fn handle(&self) -> BarrierPollHandle
Get a handle that source operators use to poll for barriers.
Sourcepub fn trigger(&self, checkpoint_id: u64, barrier_flags: u64)
pub fn trigger(&self, checkpoint_id: u64, barrier_flags: u64)
Trigger a new checkpoint barrier.
The next BarrierPollHandle::poll call on any source will
observe this barrier and return it. If a previous barrier has
not been consumed, it is superseded — this is intentional for
the Chandy-Lamport protocol where only the latest checkpoint
matters.
§Arguments
checkpoint_id- Unique checkpoint ID (must fit in 32 bits)barrier_flags- Barrier flags (must fit in 32 bits)
§Panics
Debug-asserts that checkpoint_id and barrier_flags fit in u32.
Trait Implementations§
Source§impl Debug for CheckpointBarrierInjector
impl Debug for CheckpointBarrierInjector
Auto Trait Implementations§
impl !Freeze for CheckpointBarrierInjector
impl RefUnwindSafe for CheckpointBarrierInjector
impl Send for CheckpointBarrierInjector
impl Sync for CheckpointBarrierInjector
impl Unpin for CheckpointBarrierInjector
impl UnsafeUnpin for CheckpointBarrierInjector
impl UnwindSafe for CheckpointBarrierInjector
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
§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