pub trait ResumptionFrontierCalculator<T> {
type State;
fn initialize_state<'life0, 'life1, 'async_trait>(
&'life0 self,
client_cache: &'life1 PersistClientCache
) -> Pin<Box<dyn Future<Output = Self::State> + Send + 'async_trait>>
where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn calculate_resumption_frontier<'life0, 'life1, 'async_trait>(
&'life0 self,
state: &'life1 mut Self::State
) -> Pin<Box<dyn Future<Output = Antichain<T>> + Send + 'async_trait>>
where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}
Expand description
A trait that is used to calculate safe resumption frontiers for a source.
Use ResumptionFrontierCalculator::initialize_state
for creating an
opaque state that you should keep around. Then repeatedly call
ResumptionFrontierCalculator::calculate_resumption_frontier
with the
state to efficiently calculate an up-to-date frontier.
Required Associated Types§
Required Methods§
sourcefn initialize_state<'life0, 'life1, 'async_trait>(
&'life0 self,
client_cache: &'life1 PersistClientCache
) -> Pin<Box<dyn Future<Output = Self::State> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn initialize_state<'life0, 'life1, 'async_trait>(
&'life0 self,
client_cache: &'life1 PersistClientCache
) -> Pin<Box<dyn Future<Output = Self::State> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Creates an opaque state type that can be used to efficiently calculate a new resumption frontier when needed.