pub struct StreamingGraphProcessor { /* private fields */ }
Expand description
Streaming graph processor for handling incremental updates
Implementations§
Source§impl StreamingGraphProcessor
impl StreamingGraphProcessor
Sourcepub fn new(initial_graph: ArrowGraph) -> Self
pub fn new(initial_graph: ArrowGraph) -> Self
Create a new streaming processor with an initial graph
Sourcepub fn set_change_log_enabled(&mut self, enabled: bool)
pub fn set_change_log_enabled(&mut self, enabled: bool)
Enable or disable change logging
Sourcepub fn graph(&self) -> &ArrowGraph
pub fn graph(&self) -> &ArrowGraph
Get current graph state
Sourcepub fn update_count(&self) -> u64
pub fn update_count(&self) -> u64
Get current update count
Sourcepub fn apply_update(&mut self, update: StreamUpdate) -> Result<UpdateResult>
pub fn apply_update(&mut self, update: StreamUpdate) -> Result<UpdateResult>
Apply a streaming update to the graph
Sourcepub fn apply_updates(
&mut self,
updates: Vec<StreamUpdate>,
) -> Result<Vec<UpdateResult>>
pub fn apply_updates( &mut self, updates: Vec<StreamUpdate>, ) -> Result<Vec<UpdateResult>>
Apply multiple updates in sequence
Sourcepub fn get_change_log_since(
&self,
since_update: u64,
) -> Vec<(u64, StreamUpdate)>
pub fn get_change_log_since( &self, since_update: u64, ) -> Vec<(u64, StreamUpdate)>
Get the change log since a specific update count
Sourcepub fn get_statistics(&self) -> StreamingStatistics
pub fn get_statistics(&self) -> StreamingStatistics
Get statistics about the streaming processor
Sourcepub fn create_snapshot(&self) -> Result<GraphSnapshot>
pub fn create_snapshot(&self) -> Result<GraphSnapshot>
Create a snapshot of the current graph state
Sourcepub fn restore_from_snapshot(&mut self, snapshot: GraphSnapshot)
pub fn restore_from_snapshot(&mut self, snapshot: GraphSnapshot)
Restore from a snapshot
Sourcepub fn compact_change_log(&mut self, keep_since: u64)
pub fn compact_change_log(&mut self, keep_since: u64)
Compact the change log (remove entries older than specified update count)
Auto Trait Implementations§
impl Freeze for StreamingGraphProcessor
impl !RefUnwindSafe for StreamingGraphProcessor
impl Send for StreamingGraphProcessor
impl Sync for StreamingGraphProcessor
impl Unpin for StreamingGraphProcessor
impl !UnwindSafe for StreamingGraphProcessor
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