#[non_exhaustive]pub struct TaskRetryPolicy {
pub minimum_backoff: Option<Duration>,
pub maximum_backoff: Option<Duration>,
/* private fields */
}Expand description
Task Retry Policy is implemented on a best-effort basis. Retry delay will be exponential based on provided minimum and maximum backoffs. https://en.wikipedia.org/wiki/Exponential_backoff. Note that the delay between consecutive task restarts may not always precisely match the configured settings. This can happen when the ConnectCluster is in rebalancing state or if the ConnectCluster is unresponsive etc. The default values for minimum and maximum backoffs are 60 seconds and 30 minutes respectively.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.minimum_backoff: Option<Duration>Optional. The minimum amount of time to wait before retrying a failed task. This sets a lower bound for the backoff delay.
maximum_backoff: Option<Duration>Optional. The maximum amount of time to wait before retrying a failed task. This sets an upper bound for the backoff delay.
Implementations§
Source§impl TaskRetryPolicy
impl TaskRetryPolicy
pub fn new() -> Self
Sourcepub fn set_minimum_backoff<T>(self, v: T) -> Self
pub fn set_minimum_backoff<T>(self, v: T) -> Self
Sets the value of minimum_backoff.
Sourcepub fn set_or_clear_minimum_backoff<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_minimum_backoff<T>(self, v: Option<T>) -> Self
Sets or clears the value of minimum_backoff.
Sourcepub fn set_maximum_backoff<T>(self, v: T) -> Self
pub fn set_maximum_backoff<T>(self, v: T) -> Self
Sets the value of maximum_backoff.
Sourcepub fn set_or_clear_maximum_backoff<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_maximum_backoff<T>(self, v: Option<T>) -> Self
Sets or clears the value of maximum_backoff.
Trait Implementations§
Source§impl Clone for TaskRetryPolicy
impl Clone for TaskRetryPolicy
Source§fn clone(&self) -> TaskRetryPolicy
fn clone(&self) -> TaskRetryPolicy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more