pub trait StateStore: Send + Sync {
// Required methods
fn load_state<'life0, 'life1, 'async_trait>(
&'life0 self,
partition: &'life1 str,
) -> Pin<Box<dyn Future<Output = AnalyzerResult<StateMap>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn save_state<'life0, 'life1, 'async_trait>(
&'life0 self,
partition: &'life1 str,
state: StateMap,
) -> Pin<Box<dyn Future<Output = AnalyzerResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn list_partitions<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = AnalyzerResult<Vec<String>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn delete_partition<'life0, 'life1, 'async_trait>(
&'life0 self,
partition: &'life1 str,
) -> Pin<Box<dyn Future<Output = AnalyzerResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided method
fn load_states_batch<'life0, 'life1, 'async_trait>(
&'life0 self,
partitions: &'life1 [String],
) -> Pin<Box<dyn Future<Output = AnalyzerResult<HashMap<String, StateMap>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
}Expand description
Trait for storing and retrieving analyzer states.
Implementations handle persistence of intermediate computation states, enabling incremental analysis across data partitions.
Required Methods§
Sourcefn load_state<'life0, 'life1, 'async_trait>(
&'life0 self,
partition: &'life1 str,
) -> Pin<Box<dyn Future<Output = AnalyzerResult<StateMap>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_state<'life0, 'life1, 'async_trait>(
&'life0 self,
partition: &'life1 str,
) -> Pin<Box<dyn Future<Output = AnalyzerResult<StateMap>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Sourcefn save_state<'life0, 'life1, 'async_trait>(
&'life0 self,
partition: &'life1 str,
state: StateMap,
) -> Pin<Box<dyn Future<Output = AnalyzerResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn save_state<'life0, 'life1, 'async_trait>(
&'life0 self,
partition: &'life1 str,
state: StateMap,
) -> Pin<Box<dyn Future<Output = AnalyzerResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Saves the state for a specific partition.
§Arguments
partition- The partition identifierstate- Map of analyzer names to serialized states
Sourcefn list_partitions<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = AnalyzerResult<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_partitions<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = AnalyzerResult<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn delete_partition<'life0, 'life1, 'async_trait>(
&'life0 self,
partition: &'life1 str,
) -> Pin<Box<dyn Future<Output = AnalyzerResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_partition<'life0, 'life1, 'async_trait>(
&'life0 self,
partition: &'life1 str,
) -> Pin<Box<dyn Future<Output = AnalyzerResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Deletes the state for a specific partition.
§Arguments
partition- The partition identifier to delete