CSPARQLWindow

Struct CSPARQLWindow 

Source
pub struct CSPARQLWindow {
    pub name: String,
    pub width: i64,
    pub slide: i64,
    pub time: i64,
    pub t0: i64,
    pub active_windows: HashMap<WindowInstance, QuadContainer>,
    pub report: ReportStrategy,
    pub tick: Tick,
    pub debug_mode: bool,
    /* private fields */
}
Expand description

CSPARQL Window implementation

Fields§

§name: String§width: i64§slide: i64§time: i64§t0: i64§active_windows: HashMap<WindowInstance, QuadContainer>§report: ReportStrategy§tick: Tick§debug_mode: bool

Implementations§

Source§

impl CSPARQLWindow

Source

pub fn new( name: String, width: i64, slide: i64, report: ReportStrategy, tick: Tick, start_time: i64, ) -> Self

Source

pub fn get_content(&self, timestamp: i64) -> Option<&QuadContainer>

Get window content at a specific timestamp Returns the window with the smallest close time that contains the timestamp

Source

pub fn add(&mut self, quad: Quad, timestamp: i64)

Add a quad to the window at the given timestamp

Source

pub fn scope(&mut self, t_e: i64)

Calculate and create windows based on the event time

Source

pub fn subscribe<F>(&mut self, stream_type: StreamType, callback: F)
where F: Fn(QuadContainer) + Send + Sync + 'static,

Subscribe a callback to window emissions

Source

pub fn get_content_from_window(&self, timestamp: i64) -> Option<&QuadContainer>

Get content from window at specific timestamp (alternative method name for compatibility)

Source

pub fn get_active_window_count(&self) -> usize

Get the current number of active windows

Source

pub fn get_active_window_ranges(&self) -> Vec<(i64, i64)>

Get the timestamp range of active windows

Source

pub fn set_debug_mode(&mut self, enabled: bool)

Enable or disable debug mode for verbose logging

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V