pub trait Merger: Default {
type Chunk: Container;
type Output;
type Time;
// Required methods
fn merge(
&mut self,
list1: Vec<Self::Chunk>,
list2: Vec<Self::Chunk>,
output: &mut Vec<Self::Chunk>,
stash: &mut Vec<Self::Chunk>,
);
fn extract(
&mut self,
merged: Vec<Self::Chunk>,
upper: AntichainRef<'_, Self::Time>,
frontier: &mut Antichain<Self::Time>,
readied: &mut Vec<Self::Chunk>,
kept: &mut Vec<Self::Chunk>,
stash: &mut Vec<Self::Chunk>,
);
fn seal<B: Builder<Input = Self::Output, Time = Self::Time>>(
chain: &mut Vec<Self::Chunk>,
lower: AntichainRef<'_, Self::Time>,
upper: AntichainRef<'_, Self::Time>,
since: AntichainRef<'_, Self::Time>,
) -> B::Output;
fn account(chunk: &Self::Chunk) -> (usize, usize, usize, usize);
}
Expand description
A trait to describe interesting moments in a merge batcher.
Required Associated Types§
Required Methods§
sourcefn merge(
&mut self,
list1: Vec<Self::Chunk>,
list2: Vec<Self::Chunk>,
output: &mut Vec<Self::Chunk>,
stash: &mut Vec<Self::Chunk>,
)
fn merge( &mut self, list1: Vec<Self::Chunk>, list2: Vec<Self::Chunk>, output: &mut Vec<Self::Chunk>, stash: &mut Vec<Self::Chunk>, )
Merge chains into an output chain.
sourcefn extract(
&mut self,
merged: Vec<Self::Chunk>,
upper: AntichainRef<'_, Self::Time>,
frontier: &mut Antichain<Self::Time>,
readied: &mut Vec<Self::Chunk>,
kept: &mut Vec<Self::Chunk>,
stash: &mut Vec<Self::Chunk>,
)
fn extract( &mut self, merged: Vec<Self::Chunk>, upper: AntichainRef<'_, Self::Time>, frontier: &mut Antichain<Self::Time>, readied: &mut Vec<Self::Chunk>, kept: &mut Vec<Self::Chunk>, stash: &mut Vec<Self::Chunk>, )
Extract ready updates based on the upper
frontier.
sourcefn seal<B: Builder<Input = Self::Output, Time = Self::Time>>(
chain: &mut Vec<Self::Chunk>,
lower: AntichainRef<'_, Self::Time>,
upper: AntichainRef<'_, Self::Time>,
since: AntichainRef<'_, Self::Time>,
) -> B::Output
fn seal<B: Builder<Input = Self::Output, Time = Self::Time>>( chain: &mut Vec<Self::Chunk>, lower: AntichainRef<'_, Self::Time>, upper: AntichainRef<'_, Self::Time>, since: AntichainRef<'_, Self::Time>, ) -> B::Output
Build from a chain
TODO: We can move this entirely to MergeBatcher
once builders can accepts chains.
Object Safety§
This trait is not object safe.