pub struct Spine<B: Batch> { /* 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> Spine<B>
impl<B: Batch> Spine<B>
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: Batch + Clone + 'static> Trace for Spine<B>
impl<B: Batch + Clone + 'static> Trace for Spine<B>
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: Batch + Clone + 'static> TraceReader for Spine<B>
impl<B: Batch + Clone + 'static> TraceReader for Spine<B>
Source§fn batches_through(
&mut self,
upper: AntichainRef<'_, Self::Time>,
) -> Option<Vec<Self::Batch>>
fn batches_through( &mut self, upper: AntichainRef<'_, Self::Time>, ) -> Option<Vec<Self::Batch>>
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,
) -> (CursorList<<Self::Batch as Navigable>::Cursor>, Vec<Self::Batch>)
fn cursor( &mut self, ) -> (CursorList<<Self::Batch as Navigable>::Cursor>, Vec<Self::Batch>)
Source§fn cursor_through(
&mut self,
upper: AntichainRef<'_, Self::Time>,
) -> Option<(CursorList<<Self::Batch as Navigable>::Cursor>, Vec<Self::Batch>)>
fn cursor_through( &mut self, upper: AntichainRef<'_, Self::Time>, ) -> Option<(CursorList<<Self::Batch as Navigable>::Cursor>, Vec<Self::Batch>)>
upper. Read moreSource§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> !RefUnwindSafe for Spine<B>
impl<B> !Send for Spine<B>
impl<B> !Sync for Spine<B>
impl<B> !UnwindSafe for Spine<B>
impl<B> Freeze for Spine<B>
impl<B> Unpin for Spine<B>
impl<B> UnsafeUnpin for Spine<B>
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§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.