Struct fluvio_sc_schema::store::ChangeListener
[−]pub struct ChangeListener<S, C> where
S: Spec,
C: MetadataItem, { /* private fields */ }
Expand description
listen for changes local store
Implementations
impl<S, C> ChangeListener<S, C> where
S: Spec,
C: MetadataItem,
impl<S, C> ChangeListener<S, C> where
S: Spec,
C: MetadataItem,
pub fn new(store: Arc<LocalStore<S, C>>) -> ChangeListener<S, C>
pub fn event_publisher(&self) -> &EventPublisher
pub fn has_change(&mut self) -> bool
pub fn has_change(&mut self) -> bool
check if there should be any changes this should be done before event listener to ensure no events are missed
pub fn load_last(&mut self)
pub fn load_last(&mut self)
sync change to current change
pub fn set_last_change(&mut self, updated_change: i64)
pub fn last_change(&self) -> i64
pub fn current_change(&self) -> i64
pub async fn listen(&'_ mut self)
pub async fn sync_changes(
&'_ mut self
) -> EpochChanges<MetadataStoreObject<S, C>>
pub async fn sync_changes(
&'_ mut self
) -> EpochChanges<MetadataStoreObject<S, C>>
find all changes derived from this listener
pub async fn sync_spec_changes(
&'_ mut self
) -> EpochChanges<MetadataStoreObject<S, C>>
pub async fn sync_spec_changes(
&'_ mut self
) -> EpochChanges<MetadataStoreObject<S, C>>
find all spec related changes
pub async fn sync_status_changes(
&'_ mut self
) -> EpochChanges<MetadataStoreObject<S, C>>
pub async fn sync_status_changes(
&'_ mut self
) -> EpochChanges<MetadataStoreObject<S, C>>
all status related changes
pub async fn sync_meta_changes(
&'_ mut self
) -> EpochChanges<MetadataStoreObject<S, C>>
pub async fn sync_meta_changes(
&'_ mut self
) -> EpochChanges<MetadataStoreObject<S, C>>
all meta related changes
pub async fn sync_changes_with_filter(
&'_ mut self,
filter: &'_ ChangeFlag
) -> EpochChanges<MetadataStoreObject<S, C>>
pub async fn sync_changes_with_filter(
&'_ mut self,
filter: &'_ ChangeFlag
) -> EpochChanges<MetadataStoreObject<S, C>>
all meta related changes
pub async fn wait_for_initial_sync(
&'_ mut self
) -> Vec<MetadataStoreObject<S, C>, Global>
pub async fn wait_for_initial_sync(
&'_ mut self
) -> Vec<MetadataStoreObject<S, C>, Global>
wait for initial loading and return all as expected
Trait Implementations
impl<S, C> Debug for ChangeListener<S, C> where
S: Spec,
C: MetadataItem,
impl<S, C> Debug for ChangeListener<S, C> where
S: Spec,
C: MetadataItem,
Auto Trait Implementations
impl<S, C> !RefUnwindSafe for ChangeListener<S, C>
impl<S, C> Send for ChangeListener<S, C> where
C: Send + Sync,
S: Send + Sync,
<S as Spec>::IndexKey: Send + Sync,
<S as Spec>::Status: Send + Sync,
impl<S, C> Sync for ChangeListener<S, C> where
C: Send + Sync,
S: Send + Sync,
<S as Spec>::IndexKey: Send + Sync,
<S as Spec>::Status: Send + Sync,
impl<S, C> Unpin for ChangeListener<S, C>
impl<S, C> !UnwindSafe for ChangeListener<S, C>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more