pub struct EventDrivenProcessor { /* private fields */ }Expand description
Event-driven graph processing system that triggers algorithms based on graph changes This system monitors graph updates and automatically executes relevant algorithms
Implementations§
Source§impl EventDrivenProcessor
impl EventDrivenProcessor
Sourcepub fn new(graph: ArrowGraph) -> Result<Self>
pub fn new(graph: ArrowGraph) -> Result<Self>
Create new event-driven processor
Sourcepub fn initialize(&mut self) -> Result<()>
pub fn initialize(&mut self) -> Result<()>
Initialize the processor with default algorithms
Sourcepub fn update(&mut self, changes: UpdateResult) -> Result<Vec<ProcessedEvent>>
pub fn update(&mut self, changes: UpdateResult) -> Result<Vec<ProcessedEvent>>
Update the graph and process events
Sourcepub fn processor(&self) -> &IncrementalGraphProcessor
pub fn processor(&self) -> &IncrementalGraphProcessor
Get processor reference
Sourcepub fn processor_mut(&mut self) -> &mut IncrementalGraphProcessor
pub fn processor_mut(&mut self) -> &mut IncrementalGraphProcessor
Get mutable processor reference
Sourcepub fn components_results(&self) -> Option<&HashMap<String, String>>
pub fn components_results(&self) -> Option<&HashMap<String, String>>
Get connected components results
Sourcepub fn recent_events(&self, count: usize) -> Vec<&ProcessedEvent>
pub fn recent_events(&self, count: usize) -> Vec<&ProcessedEvent>
Get recent events
Sourcepub fn algorithm_stats(&self) -> &HashMap<String, AlgorithmStats>
pub fn algorithm_stats(&self) -> &HashMap<String, AlgorithmStats>
Get algorithm statistics
Sourcepub fn event_rules(&self) -> &[EventRule]
pub fn event_rules(&self) -> &[EventRule]
Get event rules
Sourcepub fn set_rule_enabled(&mut self, rule_name: &str, enabled: bool)
pub fn set_rule_enabled(&mut self, rule_name: &str, enabled: bool)
Enable/disable a rule
Sourcepub fn recent_anomalies(&self, count: usize) -> Vec<&AnomalyEvent>
pub fn recent_anomalies(&self, count: usize) -> Vec<&AnomalyEvent>
Get recent anomalies
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EventDrivenProcessor
impl !RefUnwindSafe for EventDrivenProcessor
impl Send for EventDrivenProcessor
impl Sync for EventDrivenProcessor
impl Unpin for EventDrivenProcessor
impl !UnwindSafe for EventDrivenProcessor
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more