pub struct PartitionedCepMatcher<K>{ /* private fields */ }Expand description
Partitioned wrapper routing events to per-key SequentialPatternMatcher instances (P3-27).
Implementations§
Source§impl<K> PartitionedCepMatcher<K>
impl<K> PartitionedCepMatcher<K>
pub fn new(pattern: CompiledPattern) -> Self
pub fn process_event( &mut self, key: K, stage_name: &str, batch: RecordBatch, event_time_ms: i64, ) -> Vec<Vec<RecordBatch>>
Sourcepub fn evict_keys_before(&mut self, cutoff_ms: i64)
pub fn evict_keys_before(&mut self, cutoff_ms: i64)
Remove all keys whose most recent event time is strictly before
cutoff_ms. Called by the streaming CEP path after each batch to
bound memory for high-cardinality key spaces.
Sourcepub fn partition_count(&self) -> usize
pub fn partition_count(&self) -> usize
Number of currently tracked partition keys.
Sourcepub fn partial_signature(&self, key: &K) -> Option<(usize, i64)>
pub fn partial_signature(&self, key: &K) -> Option<(usize, i64)>
(stage_index, start_time_ms) of this key’s live partial match, if any.
Callers that do not know which pattern stage an incoming row represents
feed the row to each stage name in order, and must stop as soon as the
row has been consumed. Comparing this signature before and after
Self::process_event is how they detect consumption — it changes when
a partial starts, advances, or restarts after expiry (where
stage_index stays 0 but start_time_ms moves).
Without that check the same row starts a partial at stage 0 and is then advanced through every remaining stage, fabricating a complete match out of a single event.
Trait Implementations§
Source§impl<K> Clone for PartitionedCepMatcher<K>
impl<K> Clone for PartitionedCepMatcher<K>
Source§fn clone(&self) -> PartitionedCepMatcher<K>
fn clone(&self) -> PartitionedCepMatcher<K>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<K> !RefUnwindSafe for PartitionedCepMatcher<K>
impl<K> !UnwindSafe for PartitionedCepMatcher<K>
impl<K> Freeze for PartitionedCepMatcher<K>
impl<K> Send for PartitionedCepMatcher<K>where
K: Send,
impl<K> Sync for PartitionedCepMatcher<K>where
K: Sync,
impl<K> Unpin for PartitionedCepMatcher<K>where
K: Unpin,
impl<K> UnsafeUnpin for PartitionedCepMatcher<K>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
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<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request