pub struct LateDataHandler { /* private fields */ }Expand description
Handles late data according to the configured policy.
Implementations§
Source§impl LateDataHandler
impl LateDataHandler
Sourcepub fn new(policy: LateDataPolicy) -> Self
pub fn new(policy: LateDataPolicy) -> Self
Creates a new late data handler with the given policy.
Sourcepub fn with_allowed_lateness(lateness: Duration) -> Self
pub fn with_allowed_lateness(lateness: Duration) -> Self
Creates a handler that allows late data within the given lateness window.
Sourcepub fn redirect_to_side_output() -> Self
pub fn redirect_to_side_output() -> Self
Creates a handler that redirects late data to a side output.
Sourcepub fn evaluate<T>(
&mut self,
element_timestamp: DateTime<Utc>,
current_watermark: &Watermark,
element: T,
) -> LateDataResult<T>
pub fn evaluate<T>( &mut self, element_timestamp: DateTime<Utc>, current_watermark: &Watermark, element: T, ) -> LateDataResult<T>
Evaluates whether an element is late and returns the appropriate action.
§Arguments
element_timestamp: The event time of the element.current_watermark: The current watermark.element: The element to evaluate.
Sourcepub fn stats(&self) -> &LateDataStats
pub fn stats(&self) -> &LateDataStats
Returns statistics about late data handling.
Sourcepub fn reset_stats(&mut self)
pub fn reset_stats(&mut self)
Resets statistics.
Sourcepub fn policy(&self) -> &LateDataPolicy
pub fn policy(&self) -> &LateDataPolicy
Returns the configured policy.
Sourcepub fn get_allowed_lateness(&self) -> Duration
pub fn get_allowed_lateness(&self) -> Duration
Returns the allowed lateness from the policy.
Trait Implementations§
Source§impl Clone for LateDataHandler
impl Clone for LateDataHandler
Source§fn clone(&self) -> LateDataHandler
fn clone(&self) -> LateDataHandler
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for LateDataHandler
impl RefUnwindSafe for LateDataHandler
impl Send for LateDataHandler
impl Sync for LateDataHandler
impl Unpin for LateDataHandler
impl UnwindSafe for LateDataHandler
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