Skip to main content

Flusher

Trait Flusher 

Source
pub trait Flusher<D: Delta>:
    Send
    + Sync
    + 'static {
    // Required methods
    fn flush_delta<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        frozen: D::Frozen,
        epoch_range: &'life1 Range<u64>,
    ) -> Pin<Box<dyn Future<Output = Result<Arc<dyn StorageSnapshot>, String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn flush_storage<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

A flusher persists frozen deltas and ensures storage durability.

Required Methods§

Source

fn flush_delta<'life0, 'life1, 'async_trait>( &'life0 mut self, frozen: D::Frozen, epoch_range: &'life1 Range<u64>, ) -> Pin<Box<dyn Future<Output = Result<Arc<dyn StorageSnapshot>, String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Flush a frozen delta to storage.

Consumes the frozen delta by value and returns a snapshot for readers along with a broadcast payload for subscribers.

Source

fn flush_storage<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Ensure storage durability (e.g. call storage.flush()).

Implementors§