Trait CompactionEventDispatcher

Source
pub trait CompactionEventDispatcher:
    Send
    + Sync
    + 'static {
    type EventType: Send + Sync + 'static;

    // Required methods
    fn on_event_locally<'life0, 'async_trait>(
        &'life0 self,
        context_id: u32,
        event: Self::EventType,
    ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn on_event_remotely<'life0, 'async_trait>(
        &'life0 self,
        context_id: u32,
        event: Self::EventType,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn should_forward(&self, event: &Self::EventType) -> bool;
    fn remove_compactor(&self, context_id: u32);
}

Required Associated Types§

Source

type EventType: Send + Sync + 'static

Required Methods§

Source

fn on_event_locally<'life0, 'async_trait>( &'life0 self, context_id: u32, event: Self::EventType, ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn on_event_remotely<'life0, 'async_trait>( &'life0 self, context_id: u32, event: Self::EventType, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn should_forward(&self, event: &Self::EventType) -> bool

Source

fn remove_compactor(&self, context_id: u32)

Implementors§