pub trait RuntimeUnitOfWorkPort: Send + Sync {
// Required methods
fn persist_upsert<'life0, 'life1, 'async_trait>(
&'life0 self,
aggregate: RouteRuntimeAggregate,
expected_version: Option<u64>,
projection: RouteStatusProjection,
events: &'life1 [RuntimeEvent],
) -> Pin<Box<dyn Future<Output = Result<(), CamelError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn persist_delete<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
route_id: &'life1 str,
events: &'life2 [RuntimeEvent],
) -> Pin<Box<dyn Future<Output = Result<(), CamelError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
// Provided method
fn recover_from_journal<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), CamelError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
}Required Methods§
Sourcefn persist_upsert<'life0, 'life1, 'async_trait>(
&'life0 self,
aggregate: RouteRuntimeAggregate,
expected_version: Option<u64>,
projection: RouteStatusProjection,
events: &'life1 [RuntimeEvent],
) -> Pin<Box<dyn Future<Output = Result<(), CamelError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn persist_upsert<'life0, 'life1, 'async_trait>(
&'life0 self,
aggregate: RouteRuntimeAggregate,
expected_version: Option<u64>,
projection: RouteStatusProjection,
events: &'life1 [RuntimeEvent],
) -> Pin<Box<dyn Future<Output = Result<(), CamelError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Atomically persist aggregate + projection + events for an upsert transition.
Sourcefn persist_delete<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
route_id: &'life1 str,
events: &'life2 [RuntimeEvent],
) -> Pin<Box<dyn Future<Output = Result<(), CamelError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn persist_delete<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
route_id: &'life1 str,
events: &'life2 [RuntimeEvent],
) -> Pin<Box<dyn Future<Output = Result<(), CamelError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Atomically persist delete transition (remove aggregate/projection + append events).
Provided Methods§
Sourcefn recover_from_journal<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), CamelError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn recover_from_journal<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), CamelError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Recover in-memory runtime state from durable journal, if available.
Implementations without durable journal support should return Ok(()).