Skip to main content

Batcher

Trait Batcher 

Source
pub trait Batcher {
    type Item;
    type Time: Timestamp;

    // Required methods
    fn new(
        logger: Option<Logger<DifferentialEvent, WorkerIdentifier>>,
        operator_id: usize,
    ) -> Self;
    fn push_batch(&mut self, batch: RefOrMut<'_, Vec<Self::Item>>);
    fn seal<B: Builder<Item = Self::Item, Time = Self::Time>>(
        &mut self,
        upper: Antichain<Self::Time>,
    ) -> B::Output;
    fn frontier(&mut self) -> AntichainRef<'_, Self::Time>;
}
Expand description

Functionality for collecting and batching updates.

Required Associated Types§

Source

type Item

Type of update pushed into the batcher.

Source

type Time: Timestamp

Times at which batches are formed.

Required Methods§

Source

fn new( logger: Option<Logger<DifferentialEvent, WorkerIdentifier>>, operator_id: usize, ) -> Self

Allocates a new empty batcher.

Source

fn push_batch(&mut self, batch: RefOrMut<'_, Vec<Self::Item>>)

Adds an unordered batch of elements to the batcher.

Source

fn seal<B: Builder<Item = Self::Item, Time = Self::Time>>( &mut self, upper: Antichain<Self::Time>, ) -> B::Output

Returns all updates not greater or equal to an element of upper.

Source

fn frontier(&mut self) -> AntichainRef<'_, Self::Time>

Returns the lower envelope of contained update times.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<K, V, T, D> Batcher for ColumnatedMergeBatcher<K, V, T, D>
where K: Columnation + Ord + Clone + 'static, V: Columnation + Ord + Clone + 'static, T: Columnation + Timestamp + 'static, D: Columnation + Semigroup + 'static,

Source§

type Item = ((K, V), T, D)

Source§

type Time = T

Source§

impl<K, V, T, D> Batcher for MergeBatcher<K, V, T, D>
where K: Ord + Clone, V: Ord + Clone, T: Timestamp, D: Semigroup,

Source§

type Item = ((K, V), T, D)

Source§

type Time = T