Struct differential_dataflow::trace::implementations::spine_fueled::Spine
source · pub struct Spine<B: Batch, BA, BU> { /* private fields */ }
Expand description
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§
source§impl<B: Batch, BA, BU> Spine<B, BA, BU>
impl<B: Batch, BA, BU> Spine<B, BA, BU>
sourcepub fn with_effort(
effort: usize,
operator: OperatorInfo,
logger: Option<Logger>,
activator: Option<Activator>,
) -> Self
pub fn with_effort( 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.
sourcepub fn introduce_batch(&mut self, batch: Option<B>, batch_index: usize)
pub fn introduce_batch(&mut self, batch: Option<B>, batch_index: usize)
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.
sourcepub fn apply_fuel(&mut self, fuel: &mut isize)
pub fn apply_fuel(&mut self, fuel: &mut isize)
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§
source§impl<B, BA, BU> Trace for Spine<B, BA, BU>
impl<B, BA, BU> Trace for Spine<B, BA, BU>
source§fn exert(&mut self)
fn exert(&mut self)
Apply some amount of effort to trace maintenance.
Whether and how much effort to apply is determined by self.exert_logic
, a closure the user can set.
source§fn new(
info: OperatorInfo,
logging: Option<Logger>,
activator: Option<Activator>,
) -> Self
fn new( info: OperatorInfo, logging: Option<Logger>, activator: Option<Activator>, ) -> Self
source§fn set_exert_logic(&mut self, logic: ExertionLogic)
fn set_exert_logic(&mut self, logic: ExertionLogic)
source§impl<B, BA, BU> TraceReader for Spine<B, BA, BU>
impl<B, BA, BU> TraceReader for Spine<B, BA, BU>
§type Key<'a> = <B as BatchReader>::Key<'a>
type Key<'a> = <B as BatchReader>::Key<'a>
§type Val<'a> = <B as BatchReader>::Val<'a>
type Val<'a> = <B as BatchReader>::Val<'a>
§type Time = <B as BatchReader>::Time
type Time = <B as BatchReader>::Time
§type TimeGat<'a> = <B as BatchReader>::TimeGat<'a>
type TimeGat<'a> = <B as BatchReader>::TimeGat<'a>
§type Diff = <B as BatchReader>::Diff
type Diff = <B as BatchReader>::Diff
§type DiffGat<'a> = <B as BatchReader>::DiffGat<'a>
type DiffGat<'a> = <B as BatchReader>::DiffGat<'a>
§type Cursor = CursorList<<B as BatchReader>::Cursor>
type Cursor = CursorList<<B as BatchReader>::Cursor>
source§fn cursor_through(
&mut self,
upper: AntichainRef<'_, Self::Time>,
) -> Option<(Self::Cursor, Self::Storage)>
fn cursor_through( &mut self, upper: AntichainRef<'_, Self::Time>, ) -> Option<(Self::Cursor, Self::Storage)>
upper
. Read moresource§fn set_logical_compaction(&mut self, frontier: AntichainRef<'_, B::Time>)
fn set_logical_compaction(&mut self, frontier: AntichainRef<'_, B::Time>)
source§fn get_logical_compaction(&mut self) -> AntichainRef<'_, B::Time>
fn get_logical_compaction(&mut self) -> AntichainRef<'_, B::Time>
source§fn set_physical_compaction(&mut self, frontier: AntichainRef<'_, B::Time>)
fn set_physical_compaction(&mut self, frontier: AntichainRef<'_, B::Time>)
source§fn get_physical_compaction(&mut self) -> AntichainRef<'_, B::Time>
fn get_physical_compaction(&mut self) -> AntichainRef<'_, B::Time>
source§fn map_batches<F: FnMut(&Self::Batch)>(&self, f: F)
fn map_batches<F: FnMut(&Self::Batch)>(&self, f: F)
source§fn cursor(&mut self) -> (Self::Cursor, Self::Storage)
fn cursor(&mut self) -> (Self::Cursor, Self::Storage)
source§fn advance_by(&mut self, frontier: AntichainRef<'_, Self::Time>)
fn advance_by(&mut self, frontier: AntichainRef<'_, Self::Time>)
set_logical_compaction
set_logical_compaction
.source§fn advance_frontier(&mut self) -> AntichainRef<'_, Self::Time>
fn advance_frontier(&mut self) -> AntichainRef<'_, Self::Time>
get_logical_compaction
get_logical_compaction
.source§fn distinguish_since(&mut self, frontier: AntichainRef<'_, Self::Time>)
fn distinguish_since(&mut self, frontier: AntichainRef<'_, Self::Time>)
set_physical_compaction
set_physical_compaction
.source§fn distinguish_frontier(&mut self) -> AntichainRef<'_, Self::Time>
fn distinguish_frontier(&mut self) -> AntichainRef<'_, Self::Time>
get_physical_compaction
get_physical_compaction
.source§fn read_upper(&mut self, target: &mut Antichain<Self::Time>)
fn read_upper(&mut self, target: &mut Antichain<Self::Time>)
Auto Trait Implementations§
impl<B, BA, BU> Freeze for Spine<B, BA, BU>
impl<B, BA, BU> !RefUnwindSafe for Spine<B, BA, BU>
impl<B, BA, BU> !Send for Spine<B, BA, BU>
impl<B, BA, BU> !Sync for Spine<B, BA, BU>
impl<B, BA, BU> Unpin for Spine<B, BA, BU>
impl<B, BA, BU> !UnwindSafe for Spine<B, BA, BU>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<'a, S, T> Semigroup<&'a S> for Twhere
T: Semigroup<S>,
impl<'a, S, T> Semigroup<&'a S> for Twhere
T: Semigroup<S>,
source§fn plus_equals(&mut self, rhs: &&'a S)
fn plus_equals(&mut self, rhs: &&'a S)
std::ops::AddAssign
, for types that do not implement AddAssign
.