pub struct TumblingEngine<G, S, Accumulator> { /* private fields */ }Implementations§
Source§impl<G, S, Accumulator> TumblingEngine<G, S, Accumulator>where
G: Clone + Eq + Ord + Hash + Debug + StateCodec,
S: WindowAnchor + Hash,
Accumulator: WindowAccumulator,
GroupMeta<S>: OperatorState,
TumblingIndexEntry<G, S>: OperatorState,
impl<G, S, Accumulator> TumblingEngine<G, S, Accumulator>where
G: Clone + Eq + Ord + Hash + Debug + StateCodec,
S: WindowAnchor + Hash,
Accumulator: WindowAccumulator,
GroupMeta<S>: OperatorState,
TumblingIndexEntry<G, S>: OperatorState,
pub fn new(config: WindowEngineConfig) -> Self
pub fn dropped_retractions(&self) -> u64
pub fn reindex_window( &mut self, store: &mut dyn StateStore, group: &G, window_start: S, id: GroupId, slot_key: &EncodedKey, prior: Option<u64>, new: Option<u64>, ) -> Result<()>
pub fn apply<K, NA>( &mut self, store: &mut dyn StateStore, buckets: TumblingBuckets<G, S, Accumulator::Contribution>, order: &[(G, WindowSpan<S>)], slot_key: K, new_accumulator: NA, ) -> Result<Vec<WindowResult<G, S, Accumulator::Output>>>
pub fn expire( &mut self, store: &mut dyn StateStore, threshold: u64, ) -> Result<Vec<ExpiredWindow<G, S>>>
pub fn earliest_expiry( &mut self, store: &mut dyn StateStore, ) -> Result<Option<u64>>
pub fn expire_meta( &mut self, store: &mut dyn StateStore, threshold: u64, ) -> Result<usize>
Trait Implementations§
Source§impl<G, S, Accumulator> Reaper for TumblingEngine<G, S, Accumulator>
impl<G, S, Accumulator> Reaper for TumblingEngine<G, S, Accumulator>
fn reap( &mut self, store: &mut dyn StateStore, key: &GroupStateKey, ) -> Result<()>
Auto Trait Implementations§
impl<G, S, Accumulator> Freeze for TumblingEngine<G, S, Accumulator>
impl<G, S, Accumulator> RefUnwindSafe for TumblingEngine<G, S, Accumulator>
impl<G, S, Accumulator> Send for TumblingEngine<G, S, Accumulator>
impl<G, S, Accumulator> Sync for TumblingEngine<G, S, Accumulator>
impl<G, S, Accumulator> Unpin for TumblingEngine<G, S, Accumulator>
impl<G, S, Accumulator> UnsafeUnpin for TumblingEngine<G, S, Accumulator>
impl<G, S, Accumulator> UnwindSafe for TumblingEngine<G, S, Accumulator>
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