pub trait SpeculativeExecutionPolicy: Debug + Send + Sync {
// Required methods
fn max_retry_count(&self, context: &Context) -> usize;
fn retry_interval(&self, context: &Context) -> Duration;
}
Expand description
The policy that decides if the driver will send speculative queries to the next hosts when the current host takes too long to respond.
Required Methods§
sourcefn max_retry_count(&self, context: &Context) -> usize
fn max_retry_count(&self, context: &Context) -> usize
The maximum number of speculative executions that will be triggered for a given request (does not include the initial request)
sourcefn retry_interval(&self, context: &Context) -> Duration
fn retry_interval(&self, context: &Context) -> Duration
The delay between each speculative execution