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: boolImplementations§
Source§impl CSPARQLWindow
impl CSPARQLWindow
pub fn new( name: String, width: i64, slide: i64, report: ReportStrategy, tick: Tick, start_time: i64, ) -> Self
Sourcepub fn get_content(&self, timestamp: i64) -> Option<&QuadContainer>
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
Sourcepub fn add(&mut self, quad: Quad, timestamp: i64)
pub fn add(&mut self, quad: Quad, timestamp: i64)
Add a quad to the window at the given timestamp
Sourcepub fn subscribe<F>(&mut self, stream_type: StreamType, callback: F)
pub fn subscribe<F>(&mut self, stream_type: StreamType, callback: F)
Subscribe a callback to window emissions
Sourcepub fn get_content_from_window(&self, timestamp: i64) -> Option<&QuadContainer>
pub fn get_content_from_window(&self, timestamp: i64) -> Option<&QuadContainer>
Get content from window at specific timestamp (alternative method name for compatibility)
Sourcepub fn get_active_window_count(&self) -> usize
pub fn get_active_window_count(&self) -> usize
Get the current number of active windows
Sourcepub fn get_active_window_ranges(&self) -> Vec<(i64, i64)>
pub fn get_active_window_ranges(&self) -> Vec<(i64, i64)>
Get the timestamp range of active windows
Sourcepub fn set_debug_mode(&mut self, enabled: bool)
pub fn set_debug_mode(&mut self, enabled: bool)
Enable or disable debug mode for verbose logging
Auto Trait Implementations§
impl Freeze for CSPARQLWindow
impl !RefUnwindSafe for CSPARQLWindow
impl Send for CSPARQLWindow
impl Sync for CSPARQLWindow
impl Unpin for CSPARQLWindow
impl !UnwindSafe for CSPARQLWindow
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