pub struct CheckpointBarrierInjector { /* private fields */ }Expand description
Cross-thread barrier injector for source operators.
The coordinator thread publishes a 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 can_trigger(&self) -> bool
pub fn can_trigger(&self) -> bool
Whether no barrier command is currently being published, pending, or consumed. The coordinator uses this as an all-source preflight before fan-out.
Sourcepub fn trigger(&self, barrier: CheckpointBarrier) -> bool
pub fn trigger(&self, barrier: CheckpointBarrier) -> bool
Trigger a new checkpoint barrier.
The next BarrierPollHandle::poll call on any source will
observe this barrier and return it. Returns false without
modifying the pending command if the identity is zero or noncanonical, or
if another trigger is being published, is pending, or is being consumed.
§Arguments
barrier- Exact barrier command to publish.checkpoint_idandepochmust name the same nonzero durable checkpoint.
Sourcepub fn cancel_exact(&self, barrier: CheckpointBarrier) -> bool
pub fn cancel_exact(&self, barrier: CheckpointBarrier) -> bool
Cancel the pending barrier with this exact checkpoint identity.
Returns true only when this call claims and cancels a pending command
whose checkpoint ID and epoch both match. A stale identity, an idle
injector, or a barrier already claimed by a poller returns false.
Mismatched pending commands remain available to pollers unchanged.
Trait Implementations§
Source§impl Clone for CheckpointBarrierInjector
impl Clone for CheckpointBarrierInjector
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> Allocation for T
§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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].