Skip to main content

Batcher

Trait Batcher 

Source
pub trait Batcher {
    type Input;
    type Output;
    type Time: Timestamp;

    // Required methods
    fn new(logger: Option<Logger>, operator_id: usize) -> Self;
    fn push_container(&mut self, batch: &mut Self::Input);
    fn seal<B: Builder<Input = Self::Output, 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 Input

Type pushed into the batcher.

Source

type Output

Type produced by the batcher.

Source

type Time: Timestamp

Times at which batches are formed.

Required Methods§

Source

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

Allocates a new empty batcher.

Source

fn push_container(&mut self, batch: &mut Self::Input)

Adds an unordered container of elements to the batcher.

Source

fn seal<B: Builder<Input = Self::Output, 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<Input, C, M> Batcher for MergeBatcher<Input, C, M>
where C: ContainerBuilder<Container = M::Chunk> + for<'a> PushInto<&'a mut Input>, M: Merger<Time: Timestamp>,

Source§

type Input = Input

Source§

type Time = <M as Merger>::Time

Source§

type Output = <M as Merger>::Chunk

Source§

impl<T: Timestamp, S: BatcherStorage<T>> Batcher for Batcher<T, S>

Source§

type Time = T

Source§

type Input = S

Source§

type Output = S