Trait differential_dataflow::trace::Trace

source ·
pub trait Trace: TraceReader
where <Self as TraceReader>::Batch: Batch,
{ // Required methods fn new( info: OperatorInfo, logging: Option<Logger>, activator: Option<Activator>, ) -> Self; fn exert(&mut self); fn set_exert_logic(&mut self, logic: ExertionLogic); fn insert(&mut self, batch: Self::Batch); fn close(&mut self); }
Expand description

An append-only collection of (key, val, time, diff) tuples.

The trace must pretend to look like a collection of (Key, Val, Time, isize) tuples, but is permitted to introduce new types KeyRef, ValRef, and TimeRef which can be dereference to the types above.

The trace must be constructable from, and navigable by the Key, Val, Time types, but does not need to return them.

Required Methods§

source

fn new( info: OperatorInfo, logging: Option<Logger>, activator: Option<Activator>, ) -> Self

Allocates a new empty trace.

source

fn exert(&mut self)

Exert merge effort, even without updates.

source

fn set_exert_logic(&mut self, logic: ExertionLogic)

Sets the logic for exertion in the absence of updates.

The function receives an iterator over batch levels, from large to small, as triples (level, count, length), indicating the level, the number of batches, and their total length in updates. It should return a number of updates to perform, or None if no work is required.

source

fn insert(&mut self, batch: Self::Batch)

Introduces a batch of updates to the trace.

Batches describe the time intervals they contain, and they should be added to the trace in contiguous intervals. If a batch arrives with a lower bound that does not equal the upper bound of the most recent addition, the trace will add an empty batch. It is an error to then try to populate that region of time.

This restriction could be relaxed, especially if we discover ways in which batch interval order could commute. For now, the trace should complain, to the extent that it cares about contiguous intervals.

source

fn close(&mut self)

Introduces an empty batch concluding the trace.

This method should be logically equivalent to introducing an empty batch whose lower frontier equals the upper frontier of the most recently introduced batch, and whose upper frontier is empty.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<B> Trace for Spine<B>
where B: Batch + Clone + 'static,