RSPEngine

Struct RSPEngine 

Source
pub struct RSPEngine { /* private fields */ }
Expand description

The main RSP (RDF Stream Processing) Engine

Implementations§

Source§

impl RSPEngine

Source

pub fn new(query: String) -> Self

Create a new RSP Engine from an RSPQL query

Source

pub fn initialize(&mut self) -> Result<(), String>

Initialize the engine by creating windows and streams

Source

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

Source

pub fn start_processing(&self) -> Receiver<BindingWithTimestamp>

Convenience method to register using the engine’s own data

Source

pub fn get_stream(&self, stream_name: &str) -> Option<RDFStream>

Get a stream by name (returns a clone for easier usage)

Source

pub fn add_static_data(&mut self, quad: Quad)

Add static data to the R2R operator

Source

pub fn get_all_streams(&self) -> Vec<String>

Get all stream names

Source

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

Source

pub fn parsed_query(&self) -> &ParsedQuery

Get the parsed query

Source

pub fn get_window(&self, window_name: &str) -> Option<Arc<Mutex<CSPARQLWindow>>>

Get a window by name

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