Struct timely::progress::reachability::Tracker
source · pub struct Tracker<T: Timestamp> { /* private fields */ }
Expand description
An interactive tracker of propagated reachability information.
A Tracker
tracks, for a fixed graph topology, the implications of
pointstamp changes at various node input and output ports. These changes may
alter the potential pointstamps that could arrive at downstream input ports.
Implementations§
source§impl<T: Timestamp> Tracker<T>
impl<T: Timestamp> Tracker<T>
sourcepub fn update(&mut self, location: Location, time: T, value: i64)
pub fn update(&mut self, location: Location, time: T, value: i64)
Updates the count for a time at a location.
sourcepub fn update_target(&mut self, target: Target, time: T, value: i64)
pub fn update_target(&mut self, target: Target, time: T, value: i64)
Updates the count for a time at a target (operator input, scope output).
sourcepub fn update_source(&mut self, source: Source, time: T, value: i64)
pub fn update_source(&mut self, source: Source, time: T, value: i64)
Updates the count for a time at a source (operator output, scope input).
sourcepub fn tracking_anything(&mut self) -> bool
pub fn tracking_anything(&mut self) -> bool
Indicates if any pointstamps have positive count.
sourcepub fn allocate_from(
builder: Builder<T>,
logger: Option<TrackerLogger>,
) -> (Self, Vec<Vec<Antichain<T::Summary>>>)
pub fn allocate_from( builder: Builder<T>, logger: Option<TrackerLogger>, ) -> (Self, Vec<Vec<Antichain<T::Summary>>>)
Allocate a new Tracker
using the shape from summaries
.
The result is a pair of tracker, and the summaries from each input port to each output port.
If the optional logger is provided, it will be used to log various tracker events.
sourcepub fn propagate_all(&mut self)
pub fn propagate_all(&mut self)
Propagates all pending updates.
The method drains self.input_changes
and circulates their implications
until we cease deriving new implications.
sourcepub fn pushed_output(&mut self) -> &mut [ChangeBatch<T>]
pub fn pushed_output(&mut self) -> &mut [ChangeBatch<T>]
Implications of maintained capabilities projected to each output.
sourcepub fn pushed(&mut self) -> &mut ChangeBatch<(Location, T)>
pub fn pushed(&mut self) -> &mut ChangeBatch<(Location, T)>
A mutable reference to the pushed results of changes.
sourcepub fn node_state(&self, index: usize) -> &PerOperator<T>
pub fn node_state(&self, index: usize) -> &PerOperator<T>
Reveals per-operator frontier state.
sourcepub fn is_global(&self, location: Location, time: &T) -> bool
pub fn is_global(&self, location: Location, time: &T) -> bool
Indicates if pointstamp is in the scope-wide frontier.
Such a pointstamp would, if removed from self.pointstamps
, cause a change
to self.implications
, which is what we track for per operator input frontiers.
If the above do not hold, then its removal either 1. shouldn’t be possible,
or 2. will not affect the output of self.implications
.