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>
Source§type Key<'a> = <B as BatchReader>::Key<'a>
type Key<'a> = <B as BatchReader>::Key<'a>
Source§type Val<'a> = <B as BatchReader>::Val<'a>
type Val<'a> = <B as BatchReader>::Val<'a>
Source§type Time = <B as BatchReader>::Time
type Time = <B as BatchReader>::Time
Source§type TimeGat<'a> = <B as BatchReader>::TimeGat<'a>
type TimeGat<'a> = <B as BatchReader>::TimeGat<'a>
Source§type Diff = <B as BatchReader>::Diff
type Diff = <B as BatchReader>::Diff
Source§type DiffGat<'a> = <B as BatchReader>::DiffGat<'a>
type DiffGat<'a> = <B as BatchReader>::DiffGat<'a>
Source§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
.