pub struct RSPEngine { /* private fields */ }Expand description
The main RSP (RDF Stream Processing) Engine
Implementations§
Source§impl RSPEngine
impl RSPEngine
Sourcepub fn initialize(&mut self) -> Result<(), String>
pub fn initialize(&mut self) -> Result<(), String>
Initialize the engine by creating windows and streams
Sourcepub fn register(
windows: HashMap<String, Arc<Mutex<CSPARQLWindow>>>,
r2r: R2ROperator,
window_defs: Vec<WindowDefinition>,
) -> Receiver<BindingWithTimestamp>
pub fn register( windows: HashMap<String, Arc<Mutex<CSPARQLWindow>>>, r2r: R2ROperator, window_defs: Vec<WindowDefinition>, ) -> Receiver<BindingWithTimestamp>
Register a callback for processing window content Returns a receiver for binding results
Sourcepub fn start_processing(&self) -> Receiver<BindingWithTimestamp>
pub fn start_processing(&self) -> Receiver<BindingWithTimestamp>
Convenience method to register using the engine’s own data
Sourcepub fn get_stream(&self, stream_name: &str) -> Option<RDFStream>
pub fn get_stream(&self, stream_name: &str) -> Option<RDFStream>
Get a stream by name (returns a clone for easier usage)
Sourcepub fn add_static_data(&mut self, quad: Quad)
pub fn add_static_data(&mut self, quad: Quad)
Add static data to the R2R operator
Sourcepub fn get_all_streams(&self) -> Vec<String>
pub fn get_all_streams(&self) -> Vec<String>
Get all stream names
Sourcepub fn close_stream(
&self,
stream_uri: &str,
final_timestamp: i64,
) -> Result<(), String>
pub fn close_stream( &self, stream_uri: &str, final_timestamp: i64, ) -> Result<(), String>
Add a sentinel event to trigger closure of all open windows This should be called when the stream ends to emit final results
Sourcepub fn parsed_query(&self) -> &ParsedQuery
pub fn parsed_query(&self) -> &ParsedQuery
Get the parsed query
Sourcepub fn get_window(&self, window_name: &str) -> Option<Arc<Mutex<CSPARQLWindow>>>
pub fn get_window(&self, window_name: &str) -> Option<Arc<Mutex<CSPARQLWindow>>>
Get a window by name
Auto Trait Implementations§
impl Freeze for RSPEngine
impl RefUnwindSafe for RSPEngine
impl Send for RSPEngine
impl Sync for RSPEngine
impl Unpin for RSPEngine
impl UnwindSafe for RSPEngine
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