Skip to main content

RuntimeEventJournalPort

Trait RuntimeEventJournalPort 

Source
pub trait RuntimeEventJournalPort: Send + Sync {
    // Required methods
    fn append_batch<'life0, 'life1, 'async_trait>(
        &'life0 self,
        events: &'life1 [RuntimeEvent],
    ) -> Pin<Box<dyn Future<Output = Result<(), CamelError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn load_all<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<RuntimeEvent>, CamelError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided methods
    fn append_command_id<'life0, 'life1, 'async_trait>(
        &'life0 self,
        _command_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<(), CamelError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn remove_command_id<'life0, 'life1, 'async_trait>(
        &'life0 self,
        _command_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<(), CamelError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn load_command_ids<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<String>, CamelError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
}

Required Methods§

Source

fn append_batch<'life0, 'life1, 'async_trait>( &'life0 self, events: &'life1 [RuntimeEvent], ) -> Pin<Box<dyn Future<Output = Result<(), CamelError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Append a batch of runtime events to a durable journal.

Source

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

Load the complete journal stream (append order).

Provided Methods§

Source

fn append_command_id<'life0, 'life1, 'async_trait>( &'life0 self, _command_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), CamelError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Append a “command seen” marker to durable dedup journal.

Default implementation is a no-op for adapters without durable dedup support.

Source

fn remove_command_id<'life0, 'life1, 'async_trait>( &'life0 self, _command_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), CamelError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Append a “command forgotten” marker to durable dedup journal.

Used to rollback provisional reservations when command execution fails.

Source

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

Load all accepted command IDs from durable dedup journal.

Default implementation returns no IDs for adapters without durable dedup support.

Implementors§