pub trait ExplorerRepository: Send + Sync {
// Required methods
fn identity_ceiling<'a>(
&'a self,
query: &'a ExplorerQuery,
) -> Pin<Box<dyn Future<Output = Result<u64, ExplorerError>> + Send + 'a>>;
fn job_names<'a>(
&'a self,
window: &'a QueryWindow,
) -> Pin<Box<dyn Future<Output = Result<Vec<JobName>, ExplorerError>> + Send + 'a>>;
fn instances<'a>(
&'a self,
job_name: &'a JobName,
window: &'a QueryWindow,
) -> Pin<Box<dyn Future<Output = Result<Vec<JobInstanceProjection>, ExplorerError>> + Send + 'a>>;
fn executions<'a>(
&'a self,
job_instance_id: JobInstanceId,
window: &'a QueryWindow,
) -> Pin<Box<dyn Future<Output = Result<Vec<JobExecutionProjection>, ExplorerError>> + Send + 'a>>;
fn execution(
&self,
job_execution_id: JobExecutionId,
) -> Pin<Box<dyn Future<Output = Result<Option<JobExecutionProjection>, ExplorerError>> + Send + '_>>;
fn step_executions<'a>(
&'a self,
job_execution_id: JobExecutionId,
window: &'a QueryWindow,
) -> Pin<Box<dyn Future<Output = Result<Vec<StepExecutionProjection>, ExplorerError>> + Send + 'a>>;
fn unresolved_executions<'a>(
&'a self,
minimum_age: Duration,
window: &'a QueryWindow,
) -> Pin<Box<dyn Future<Output = Result<Vec<JobExecutionProjection>, ExplorerError>> + Send + 'a>>;
fn recovery_decisions<'a>(
&'a self,
job_execution_id: JobExecutionId,
window: &'a QueryWindow,
) -> Pin<Box<dyn Future<Output = Result<Vec<RecoveryDecision>, ExplorerError>> + Send + 'a>>;
fn flow_decisions<'a>(
&'a self,
job_execution_id: JobExecutionId,
window: &'a QueryWindow,
) -> Pin<Box<dyn Future<Output = Result<Vec<FlowDecision>, ExplorerError>> + Send + 'a>>;
fn step_partitions<'a>(
&'a self,
step_execution_id: StepExecutionId,
window: &'a QueryWindow,
) -> Pin<Box<dyn Future<Output = Result<Vec<StepPartitionProjection>, ExplorerError>> + Send + 'a>>;
fn operator_requests<'a>(
&'a self,
job_execution_id: JobExecutionId,
window: &'a QueryWindow,
) -> Pin<Box<dyn Future<Output = Result<Vec<OperatorRecord>, ExplorerError>> + Send + 'a>>;
}Expand description
A bounded read port one metadata adapter implements.
Every method executes one statement under the adapter’s ordinary read
committed isolation, returns at most QueryWindow::limit rows, and takes
no lock. Cross-page snapshot isolation is not provided.
Required Methods§
Sourcefn identity_ceiling<'a>(
&'a self,
query: &'a ExplorerQuery,
) -> Pin<Box<dyn Future<Output = Result<u64, ExplorerError>> + Send + 'a>>
fn identity_ceiling<'a>( &'a self, query: &'a ExplorerQuery, ) -> Pin<Box<dyn Future<Output = Result<u64, ExplorerError>> + Send + 'a>>
Captures the exclusive identity ceiling for one traversal.
Sourcefn job_names<'a>(
&'a self,
window: &'a QueryWindow,
) -> Pin<Box<dyn Future<Output = Result<Vec<JobName>, ExplorerError>> + Send + 'a>>
fn job_names<'a>( &'a self, window: &'a QueryWindow, ) -> Pin<Box<dyn Future<Output = Result<Vec<JobName>, ExplorerError>> + Send + 'a>>
Reads registered job names in byte order.
Sourcefn instances<'a>(
&'a self,
job_name: &'a JobName,
window: &'a QueryWindow,
) -> Pin<Box<dyn Future<Output = Result<Vec<JobInstanceProjection>, ExplorerError>> + Send + 'a>>
fn instances<'a>( &'a self, job_name: &'a JobName, window: &'a QueryWindow, ) -> Pin<Box<dyn Future<Output = Result<Vec<JobInstanceProjection>, ExplorerError>> + Send + 'a>>
Reads instances of one job name, newest identity first.
Sourcefn executions<'a>(
&'a self,
job_instance_id: JobInstanceId,
window: &'a QueryWindow,
) -> Pin<Box<dyn Future<Output = Result<Vec<JobExecutionProjection>, ExplorerError>> + Send + 'a>>
fn executions<'a>( &'a self, job_instance_id: JobInstanceId, window: &'a QueryWindow, ) -> Pin<Box<dyn Future<Output = Result<Vec<JobExecutionProjection>, ExplorerError>> + Send + 'a>>
Reads executions of one instance, newest attempt first.
Sourcefn execution(
&self,
job_execution_id: JobExecutionId,
) -> Pin<Box<dyn Future<Output = Result<Option<JobExecutionProjection>, ExplorerError>> + Send + '_>>
fn execution( &self, job_execution_id: JobExecutionId, ) -> Pin<Box<dyn Future<Output = Result<Option<JobExecutionProjection>, ExplorerError>> + Send + '_>>
Reads one execution projection.
Sourcefn step_executions<'a>(
&'a self,
job_execution_id: JobExecutionId,
window: &'a QueryWindow,
) -> Pin<Box<dyn Future<Output = Result<Vec<StepExecutionProjection>, ExplorerError>> + Send + 'a>>
fn step_executions<'a>( &'a self, job_execution_id: JobExecutionId, window: &'a QueryWindow, ) -> Pin<Box<dyn Future<Output = Result<Vec<StepExecutionProjection>, ExplorerError>> + Send + 'a>>
Reads step executions of one job execution.
Sourcefn unresolved_executions<'a>(
&'a self,
minimum_age: Duration,
window: &'a QueryWindow,
) -> Pin<Box<dyn Future<Output = Result<Vec<JobExecutionProjection>, ExplorerError>> + Send + 'a>>
fn unresolved_executions<'a>( &'a self, minimum_age: Duration, window: &'a QueryWindow, ) -> Pin<Box<dyn Future<Output = Result<Vec<JobExecutionProjection>, ExplorerError>> + Send + 'a>>
Reads non-terminal executions older than minimum_age.
Sourcefn recovery_decisions<'a>(
&'a self,
job_execution_id: JobExecutionId,
window: &'a QueryWindow,
) -> Pin<Box<dyn Future<Output = Result<Vec<RecoveryDecision>, ExplorerError>> + Send + 'a>>
fn recovery_decisions<'a>( &'a self, job_execution_id: JobExecutionId, window: &'a QueryWindow, ) -> Pin<Box<dyn Future<Output = Result<Vec<RecoveryDecision>, ExplorerError>> + Send + 'a>>
Reads recovery decisions of one job execution.
Sourcefn flow_decisions<'a>(
&'a self,
job_execution_id: JobExecutionId,
window: &'a QueryWindow,
) -> Pin<Box<dyn Future<Output = Result<Vec<FlowDecision>, ExplorerError>> + Send + 'a>>
fn flow_decisions<'a>( &'a self, job_execution_id: JobExecutionId, window: &'a QueryWindow, ) -> Pin<Box<dyn Future<Output = Result<Vec<FlowDecision>, ExplorerError>> + Send + 'a>>
Reads flow decisions of one job execution in sequence order.
Sourcefn step_partitions<'a>(
&'a self,
step_execution_id: StepExecutionId,
window: &'a QueryWindow,
) -> Pin<Box<dyn Future<Output = Result<Vec<StepPartitionProjection>, ExplorerError>> + Send + 'a>>
fn step_partitions<'a>( &'a self, step_execution_id: StepExecutionId, window: &'a QueryWindow, ) -> Pin<Box<dyn Future<Output = Result<Vec<StepPartitionProjection>, ExplorerError>> + Send + 'a>>
Reads partitions of one partitioned step execution.
Sourcefn operator_requests<'a>(
&'a self,
job_execution_id: JobExecutionId,
window: &'a QueryWindow,
) -> Pin<Box<dyn Future<Output = Result<Vec<OperatorRecord>, ExplorerError>> + Send + 'a>>
fn operator_requests<'a>( &'a self, job_execution_id: JobExecutionId, window: &'a QueryWindow, ) -> Pin<Box<dyn Future<Output = Result<Vec<OperatorRecord>, ExplorerError>> + Send + 'a>>
Reads audited operator requests for one job execution.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".