Trait differential_dataflow::trace::Batch
[−]
[src]
pub trait Batch<K, V, T, R>: BatchReader<K, V, T, R> where
Self: Sized, { type Batcher: Batcher<K, V, T, R, Self>; type Builder: Builder<K, V, T, R, Self>; type Merger: Merger<K, V, T, R, Self>; fn merge(&self, other: &Self) -> Self; fn begin_merge(&self, other: &Self) -> Self::Merger; fn advance_ref(&self, frontier: &[T]) -> Self
where
K: Ord + Clone,
V: Ord + Clone,
T: Lattice + Ord + Clone,
R: Diff, { ... } fn advance_mut(&mut self, frontier: &[T])
where
K: Ord + Clone,
V: Ord + Clone,
T: Lattice + Ord + Clone,
R: Diff, { ... } }
An immutable collection of updates.
Associated Types
type Batcher: Batcher<K, V, T, R, Self>
A type used to assemble batches from disordered updates.
type Builder: Builder<K, V, T, R, Self>
A type used to assemble batches from ordered update sequences.
type Merger: Merger<K, V, T, R, Self>
A type used to progressively merge batches.
Required Methods
fn merge(&self, other: &Self) -> Self
Merges two consecutive batches.
Panics if self.upper()
does not equal other.lower()
. This is almost certainly a logic bug,
as the resulting batch does not have a contiguous description. If you would like to put an empty
interval between the two, you can create an empty interval and do two merges.
fn begin_merge(&self, other: &Self) -> Self::Merger
Initiates the merging of consecutive batches.
The result of this method can be exercised to eventually produce the same result
that a call to self.merge(other)
would produce, but it can be done in a measured
fashion. This can help to avoid latency spikes where a large merge needs to happen.
Provided Methods
fn advance_ref(&self, frontier: &[T]) -> Self where
K: Ord + Clone,
V: Ord + Clone,
T: Lattice + Ord + Clone,
R: Diff,
K: Ord + Clone,
V: Ord + Clone,
T: Lattice + Ord + Clone,
R: Diff,
Advance times to frontier
creating a new batch.
fn advance_mut(&mut self, frontier: &[T]) where
K: Ord + Clone,
V: Ord + Clone,
T: Lattice + Ord + Clone,
R: Diff,
K: Ord + Clone,
V: Ord + Clone,
T: Lattice + Ord + Clone,
R: Diff,
Advance times to frontier
updating this batch.
This method gives batches the ability to collapse in-place when possible, and is the common
entry point to advance batches. Most types of batches do have shared state, but advance
is
commonly invoked just after a batch is formed from a merge and when there is a unique owner
of the shared state.
Implementations on Foreign Types
impl<K, V, T, R, B: Batch<K, V, T, R>> Batch<K, V, T, R> for Rc<B>
[src]
An immutable collection of updates.
type Batcher = RcBatcher<K, V, T, R, B>
type Builder = RcBuilder<K, V, T, R, B>
type Merger = RcMerger<K, V, T, R, B>
fn merge(&self, other: &Self) -> Self
[src]
fn begin_merge(&self, other: &Self) -> Self::Merger
[src]
fn advance_mut(&mut self, frontier: &[T]) where
K: Ord + Clone,
V: Ord + Clone,
T: Lattice + Ord + Clone,
R: Diff,
[src]
K: Ord + Clone,
V: Ord + Clone,
T: Lattice + Ord + Clone,
R: Diff,
fn advance_ref(&self, frontier: &[T]) -> Self where
K: Ord + Clone,
V: Ord + Clone,
T: Lattice + Ord + Clone,
R: Diff,
[src]
K: Ord + Clone,
V: Ord + Clone,
T: Lattice + Ord + Clone,
R: Diff,
impl<K, V, T, R, B: Batch<K, V, T, R> + Abomonation> Batch<K, V, T, R> for Abomonated<B, Vec<u8>>
[src]
An immutable collection of updates.
type Batcher = AbomonatedBatcher<K, V, T, R, B>
type Builder = AbomonatedBuilder<K, V, T, R, B>
type Merger = AbomonatedMerger<K, V, T, R, B>
fn merge(&self, other: &Self) -> Self
[src]
fn begin_merge(&self, other: &Self) -> Self::Merger
[src]
fn advance_ref(&self, frontier: &[T]) -> Self where
K: Ord + Clone,
V: Ord + Clone,
T: Lattice + Ord + Clone,
R: Diff,
[src]
K: Ord + Clone,
V: Ord + Clone,
T: Lattice + Ord + Clone,
R: Diff,
fn advance_mut(&mut self, frontier: &[T]) where
K: Ord + Clone,
V: Ord + Clone,
T: Lattice + Ord + Clone,
R: Diff,
[src]
K: Ord + Clone,
V: Ord + Clone,
T: Lattice + Ord + Clone,
R: Diff,
Implementors
impl<K, V, T, R> Batch<K, V, T, R> for OrdValBatch<K, V, T, R> where
K: Ord + Clone + 'static,
V: Ord + Clone + 'static,
T: Lattice + Ord + Clone + Debug + 'static,
R: Diff, type Batcher = MergeBatcher<K, V, T, R, Self>; type Builder = OrdValBuilder<K, V, T, R>; type Merger = OrdValMerger<K, V, T, R>;impl<K, T, R> Batch<K, (), T, R> for OrdKeyBatch<K, T, R> where
K: Ord + Clone + 'static,
T: Lattice + Ord + Clone + 'static,
R: Diff, type Batcher = MergeBatcher<K, (), T, R, Self>; type Builder = OrdKeyBuilder<K, T, R>; type Merger = OrdKeyMerger<K, T, R>;