pub struct RollingEngine<G, S: Slot, Accumulator> { /* private fields */ }Implementations§
Source§impl<G, S, Accumulator> RollingEngine<G, S, Accumulator>where
G: Clone + Eq + Ord + Hash + Debug + StateCodec,
S: Slot + Hash + HeapSize,
Accumulator: WindowAccumulator,
GroupMeta<S>: OperatorState,
RollingIndexEntry<G>: OperatorState,
RollingBuffer<S, Accumulator>: OperatorState,
impl<G, S, Accumulator> RollingEngine<G, S, Accumulator>where
G: Clone + Eq + Ord + Hash + Debug + StateCodec,
S: Slot + Hash + HeapSize,
Accumulator: WindowAccumulator,
GroupMeta<S>: OperatorState,
RollingIndexEntry<G>: OperatorState,
RollingBuffer<S, Accumulator>: OperatorState,
pub fn new(config: WindowEngineConfig) -> Self
pub fn new_runnable(config: WindowEngineConfig) -> Self
pub fn with_lag(self, lag: <S::Coord as Coord>::Span) -> Self
pub fn apply<K, CB, Output>(
&mut self,
store: &mut dyn StateStore,
buckets: RollingBuckets<G, S, Accumulator::Contribution>,
capacity: usize,
row_key: K,
combine: CB,
) -> Result<Vec<RollingResult<G, Output>>>where
K: Fn(&G) -> (GroupId, EncodedKey),
CB: Fn(&G, &RollingBuffer<S, Accumulator>) -> Option<Output>,
pub fn apply_evicting<K, NA, CB, Output>(
&mut self,
store: &mut dyn StateStore,
buckets: RollingBuckets<G, S, Accumulator::Contribution>,
eviction: RollingEviction<S>,
row_key: K,
new_accumulator: NA,
combine: CB,
) -> Result<Vec<RollingResult<G, Output>>>where
K: Fn(&G) -> (GroupId, EncodedKey),
NA: Fn() -> Accumulator,
CB: Fn(&G, &RollingBuffer<S, Accumulator>) -> Option<Output>,
pub fn apply_running<K, NA>( &mut self, store: &mut dyn StateStore, buckets: RollingBuckets<G, S, Accumulator::Contribution>, eviction: RollingEviction<S>, row_key: K, new_accumulator: NA, ) -> Result<Vec<RollingResult<G, Accumulator::Output>>>
pub fn expire_before_running( &mut self, store: &mut dyn StateStore, cutoff: S, ) -> Result<Vec<RollingExpiry<G, Accumulator::Output>>>
pub fn expire_meta( &mut self, store: &mut dyn StateStore, threshold: u64, ) -> Result<usize>
pub fn earliest_expiry( &mut self, store: &mut dyn StateStore, ) -> Result<Option<u64>>
pub fn expire_before<CB, Output>( &mut self, store: &mut dyn StateStore, cutoff: S, combine: CB, ) -> Result<Vec<RollingExpiry<G, Output>>>
Auto Trait Implementations§
impl<G, S, Accumulator> Freeze for RollingEngine<G, S, Accumulator>
impl<G, S, Accumulator> RefUnwindSafe for RollingEngine<G, S, Accumulator>where
<<S as Slot>::Coord as Coord>::Span: RefUnwindSafe,
PhantomData<(G, S, Accumulator)>: RefUnwindSafe,
impl<G, S, Accumulator> Send for RollingEngine<G, S, Accumulator>
impl<G, S, Accumulator> Sync for RollingEngine<G, S, Accumulator>
impl<G, S, Accumulator> Unpin for RollingEngine<G, S, Accumulator>
impl<G, S, Accumulator> UnsafeUnpin for RollingEngine<G, S, Accumulator>where
<<S as Slot>::Coord as Coord>::Span: UnsafeUnpin,
PhantomData<(G, S, Accumulator)>: UnsafeUnpin,
impl<G, S, Accumulator> UnwindSafe for RollingEngine<G, S, Accumulator>where
<<S as Slot>::Coord as Coord>::Span: UnwindSafe,
PhantomData<(G, S, Accumulator)>: UnwindSafe,
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
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
Converts
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> ⓘ
Converts
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 more