@Target(value=TYPE) @Retention(value=RUNTIME) @Import(value=RetryConfiguration.class) @Documented public @interface Backoff
BackOffPolicy
. Features:
delay()
set: the backoff is a fixed delay with that valuedelay()
and maxDelay()
are set the backoff is uniformly
distributed between the two valuesdelay()
, maxDelay()
and multiplier()
the backoff is
exponentially growing up to the maximum valuerandom()
flag is set then the multiplier is chosen
for each delay from a uniform distribution in [1, multiplier-1]Modifier and Type | Optional Element and Description |
---|---|
long |
delay
A canonical backoff period.
|
String |
delayExpression
An expression evaluating to the canonical backoff period.
|
long |
maxDelay
The maximimum wait (in milliseconds) between retries.
|
String |
maxDelayExpression
An expression evaluating to the maximimum wait (in milliseconds) between retries.
|
double |
multiplier
If positive, then used as a multiplier for generating the next delay for backoff.
|
String |
multiplierExpression
Evaluates to a vaule used as a multiplier for generating the next delay for backoff.
|
boolean |
random
In the exponential case (
multiplier() > 0) set this to true to have the
backoff delays randomized, so that the maximum delay is multiplier times the
previous delay and the distribution is uniform between the two values. |
long |
value
Synonym for
delay() . |
public abstract long value
delay()
.public abstract long delay
public abstract double multiplier
public abstract String delayExpression
delay()
.public abstract String maxDelayExpression
delay()
then the default of
30000L
is applied.
Overrides maxDelay()
public abstract String multiplierExpression
multiplier()
.public abstract boolean random
multiplier()
> 0) set this to true to have the
backoff delays randomized, so that the maximum delay is multiplier times the
previous delay and the distribution is uniform between the two values.Copyright © 2018 SpringSource. All rights reserved.