pub trait IndexerProgressStore: Send {
// Required methods
fn load_progress<'life0, 'async_trait>(
&'life0 self,
task_name: String,
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn save_progress<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
task: &'life1 Task,
checkpoint_numbers: &'life2 [u64],
) -> Pin<Box<dyn Future<Output = Result<Option<u64>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn get_ongoing_tasks<'life0, 'life1, 'async_trait>(
&'life0 self,
task_prefix: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Tasks, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_largest_indexed_checkpoint<'life0, 'life1, 'async_trait>(
&'life0 self,
prefix: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<u64>, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn register_task<'life0, 'async_trait>(
&'life0 mut self,
task_name: String,
start_checkpoint: u64,
target_checkpoint: u64,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn register_live_task<'life0, 'async_trait>(
&'life0 mut self,
task_name: String,
start_checkpoint: u64,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn update_task<'life0, 'async_trait>(
&'life0 mut self,
task: Task,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Required Methods§
fn load_progress<'life0, 'async_trait>(
&'life0 self,
task_name: String,
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn save_progress<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
task: &'life1 Task,
checkpoint_numbers: &'life2 [u64],
) -> Pin<Box<dyn Future<Output = Result<Option<u64>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn save_progress<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
task: &'life1 Task,
checkpoint_numbers: &'life2 [u64],
) -> Pin<Box<dyn Future<Output = Result<Option<u64>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Attempt to save progress. Depending on the ProgressSavingPolicy
,
the progress may be cached somewhere instead of flushing to persistent storage.
Returns saved checkpoint number if any. Caller can use this value as a signal
to see if we have reached the target checkpoint.