pub struct InvalidationEngine { /* private fields */ }Expand description
Engine for determining which subscriptions need re-execution.
Implementations§
Source§impl InvalidationEngine
impl InvalidationEngine
Sourcepub fn new(
subscription_manager: Arc<SubscriptionManager>,
config: InvalidationConfig,
) -> Self
pub fn new( subscription_manager: Arc<SubscriptionManager>, config: InvalidationConfig, ) -> Self
Create a new invalidation engine.
Sourcepub async fn process_change(&self, change: Change)
pub async fn process_change(&self, change: Change)
Process a database change.
Sourcepub async fn check_pending(&self) -> Vec<SubscriptionId>
pub async fn check_pending(&self) -> Vec<SubscriptionId>
Check for subscriptions that need to be invalidated.
Sourcepub async fn flush_all(&self) -> Vec<SubscriptionId>
pub async fn flush_all(&self) -> Vec<SubscriptionId>
Flush all pending invalidations immediately.
Sourcepub async fn take_receiver(&self) -> Option<Receiver<Vec<SubscriptionId>>>
pub async fn take_receiver(&self) -> Option<Receiver<Vec<SubscriptionId>>>
Get the invalidation receiver for consuming invalidation events.
Sourcepub async fn pending_count(&self) -> usize
pub async fn pending_count(&self) -> usize
Get pending count for monitoring.
Auto Trait Implementations§
impl Freeze for InvalidationEngine
impl !RefUnwindSafe for InvalidationEngine
impl Send for InvalidationEngine
impl Sync for InvalidationEngine
impl Unpin for InvalidationEngine
impl !UnwindSafe for InvalidationEngine
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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