Struct differential_dataflow::trace::implementations::spine_fueled::Spine [−][src]
An append-only collection of update tuples.
A spine maintains a small number of immutable collections of update tuples, merging the collections when two have similar sizes. In this way, it allows the addition of more tuples, which may then be merged with other immutable collections.
Implementations
impl<K, V, T, R, B> Spine<K, V, T, R, B> where
K: Ord + Clone,
V: Ord + Clone,
T: Lattice + Timestamp + Ord + Clone + Debug,
R: Semigroup,
B: Batch<K, V, T, R>,
[src]
K: Ord + Clone,
V: Ord + Clone,
T: Lattice + Timestamp + Ord + Clone + Debug,
R: Semigroup,
B: Batch<K, V, T, R>,
pub fn with_effort(
effort: usize,
operator: OperatorInfo,
logger: Option<Logger>,
activator: Option<Activator>
) -> Self
[src]
effort: usize,
operator: OperatorInfo,
logger: Option<Logger>,
activator: Option<Activator>
) -> Self
Allocates a fueled Spine
with a specified effort multiplier.
This trace will merge batches progressively, with each inserted batch applying a multiple
of the batch’s length in effort to each merge. The effort
parameter is that multiplier.
This value should be at least one for the merging to happen; a value of zero is not helpful.
pub fn introduce_batch(&mut self, batch: Option<B>, batch_index: usize)
[src]
Introduces a batch at an indicated level.
The level indication is often related to the size of the batch, but it can also be used to artificially fuel the computation by supplying empty batches at non-trivial indices, to move merges along.
pub fn apply_fuel(&mut self, fuel: &mut isize)
[src]
Applies an amount of fuel to merges in progress.
The supplied fuel
is for each in progress merge, and if we want to spend
the fuel non-uniformly (e.g. prioritizing merges at low layers) we could do
so in order to maintain fewer batches on average (at the risk of completing
merges of large batches later, but tbh probably not much later).
Trait Implementations
impl<K, V, T, R, B> Drop for Spine<K, V, T, R, B> where
T: Lattice + Ord,
R: Semigroup,
B: Batch<K, V, T, R>,
[src]
T: Lattice + Ord,
R: Semigroup,
B: Batch<K, V, T, R>,
impl<K, V, T, R, B> Trace for Spine<K, V, T, R, B> where
K: Ord + Clone,
V: Ord + Clone,
T: Lattice + Timestamp + Ord + Clone + Debug,
R: Semigroup,
B: Batch<K, V, T, R> + Clone + 'static,
[src]
K: Ord + Clone,
V: Ord + Clone,
T: Lattice + Timestamp + Ord + Clone + Debug,
R: Semigroup,
B: Batch<K, V, T, R> + Clone + 'static,
fn new(
info: OperatorInfo,
logging: Option<Logger>,
activator: Option<Activator>
) -> Self
[src]
info: OperatorInfo,
logging: Option<Logger>,
activator: Option<Activator>
) -> Self
fn exert(&mut self, effort: &mut isize)
[src]
Apply some amount of effort to trace maintenance.
The units of effort are updates, and the method should be thought of as analogous to inserting as many empty updates, where the trace is permitted to perform proportionate work.
fn insert(&mut self, batch: Self::Batch)
[src]
fn close(&mut self)
[src]
Completes the trace with a final empty batch.
impl<K, V, T, R, B> TraceReader for Spine<K, V, T, R, B> where
K: Ord + Clone,
V: Ord + Clone,
T: Lattice + Timestamp + Ord + Clone + Debug,
R: Semigroup,
B: Batch<K, V, T, R> + Clone + 'static,
[src]
K: Ord + Clone,
V: Ord + Clone,
T: Lattice + Timestamp + Ord + Clone + Debug,
R: Semigroup,
B: Batch<K, V, T, R> + Clone + 'static,
type Key = K
Key by which updates are indexed.
type Val = V
Values associated with keys.
type Time = T
Timestamps associated with updates
type R = R
Associated update.
type Batch = B
The type of an immutable collection of updates.
type Cursor = CursorList<K, V, T, R, <B as BatchReader<K, V, T, R>>::Cursor>
The type used to enumerate the collections contents.
fn cursor_through(
&mut self,
upper: AntichainRef<'_, T>
) -> Option<(Self::Cursor, <Self::Cursor as Cursor<K, V, T, R>>::Storage)>
[src]
&mut self,
upper: AntichainRef<'_, T>
) -> Option<(Self::Cursor, <Self::Cursor as Cursor<K, V, T, R>>::Storage)>
fn set_logical_compaction(&mut self, frontier: AntichainRef<'_, T>)
[src]
fn get_logical_compaction(&mut self) -> AntichainRef<'_, T>
[src]
fn set_physical_compaction(&mut self, frontier: AntichainRef<'_, T>)
[src]
fn get_physical_compaction(&mut self) -> AntichainRef<'_, T>
[src]
fn map_batches<F: FnMut(&Self::Batch)>(&self, f: F)
[src]
fn cursor(
&mut self
) -> (Self::Cursor, <Self::Cursor as Cursor<Self::Key, Self::Val, Self::Time, Self::R>>::Storage)
[src]
&mut self
) -> (Self::Cursor, <Self::Cursor as Cursor<Self::Key, Self::Val, Self::Time, Self::R>>::Storage)
fn advance_by(&mut self, frontier: AntichainRef<'_, Self::Time>)
[src]
fn advance_frontier(&mut self) -> AntichainRef<'_, Self::Time>
[src]
fn distinguish_since(&mut self, frontier: AntichainRef<'_, Self::Time>)
[src]
fn distinguish_frontier(&mut self) -> AntichainRef<'_, Self::Time>
[src]
fn read_upper(&mut self, target: &mut Antichain<Self::Time>) where
Self::Time: Timestamp,
[src]
Self::Time: Timestamp,
fn advance_upper(&mut self, upper: &mut Antichain<Self::Time>) where
Self::Time: Timestamp,
[src]
Self::Time: Timestamp,
Auto Trait Implementations
impl<K, V, T, R, B> !RefUnwindSafe for Spine<K, V, T, R, B>
impl<K, V, T, R, B> !Send for Spine<K, V, T, R, B>
impl<K, V, T, R, B> !Sync for Spine<K, V, T, R, B>
impl<K, V, T, R, B> Unpin for Spine<K, V, T, R, B> where
B: Unpin,
K: Unpin,
R: Unpin,
T: Unpin,
V: Unpin,
<B as Batch<K, V, T, R>>::Merger: Unpin,
B: Unpin,
K: Unpin,
R: Unpin,
T: Unpin,
V: Unpin,
<B as Batch<K, V, T, R>>::Merger: Unpin,
impl<K, V, T, R, B> !UnwindSafe for Spine<K, V, T, R, B>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,