Class BackoffStrategy
public class BackoffStrategy
- Inheritance
-
BackoffStrategy
- Inherited Members
Constructors
BackoffStrategy(long, long, long, double, double)
Configures the exponential backoff strategy.
public BackoffStrategy(long initialIntervalMs, long maxIntervalMs, long maxElapsedTimeMs, double exponent, double jitterFactor = 0.5)
Parameters
initialIntervalMs
longThe initial interval in milliseconds.
maxIntervalMs
longThe maximum interval in milliseconds.
maxElapsedTimeMs
longThe maximum elapsed time in milliseconds.
exponent
doubleThe base factor used to compute the exponential interval
jitterFactor
doubleThe jitter factor used to randomize the backoff interval
Remarks
The duration between consecutive attempts is calculated as follows: intervalMs = min(maxIntervalMs, initialIntervalMs*(baseFactor^attempts) +/- r) where baseFactor (also referred to as "exponent") is the multiplicative factor and r a random value between 0 and jitterFactor*intervalMs.
Fields
BaseFactor
public readonly double BaseFactor
Field Value
InitialIntervalMs
public readonly long InitialIntervalMs
Field Value
JitterFactor
public readonly double JitterFactor
Field Value
MaxElapsedTimeMs
public readonly long MaxElapsedTimeMs
Field Value
MaxIntervalMs
public readonly long MaxIntervalMs