Package org.apache.camel.util.backoff
Class BackOff
- java.lang.Object
-
- org.apache.camel.util.backoff.BackOff
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBackOff.BuilderA builder forBackOff
-
Field Summary
Fields Modifier and Type Field Description static DurationDEFAULT_DELAYstatic doubleDEFAULT_MULTIPLIERstatic DurationMAX_DURATIONstatic longNEVER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static BackOff.Builderbuilder()static BackOff.Builderbuilder(BackOff template)DurationgetDelay()LonggetMaxAttempts()DurationgetMaxDelay()DurationgetMaxElapsedTime()DoublegetMultiplier()voidsetDelay(Duration delay)The delay to wait before retry the operation.voidsetMaxAttempts(Long maxAttempts)The maximum number of attempts after which the back-off should be considered exhausted and no more attempts should be made.voidsetMaxDelay(Duration maxDelay)The maximum back-off time after which the delay is not more increased.voidsetMaxElapsedTime(Duration maxElapsedTime)The maximum elapsed time after which the back-off should be considered exhausted and no more attempts should be made.voidsetMultiplier(Double multiplier)The value to multiply the current interval by for each retry attempt.StringtoString()
-
-
-
Field Detail
-
NEVER
public static final long NEVER
- See Also:
- Constant Field Values
-
MAX_DURATION
public static final Duration MAX_DURATION
-
DEFAULT_DELAY
public static final Duration DEFAULT_DELAY
-
DEFAULT_MULTIPLIER
public static final double DEFAULT_MULTIPLIER
- See Also:
- Constant Field Values
-
-
Method Detail
-
getMaxDelay
public Duration getMaxDelay()
-
setMaxDelay
public void setMaxDelay(Duration maxDelay)
The maximum back-off time after which the delay is not more increased.
-
getMaxElapsedTime
public Duration getMaxElapsedTime()
-
setMaxElapsedTime
public void setMaxElapsedTime(Duration maxElapsedTime)
The maximum elapsed time after which the back-off should be considered exhausted and no more attempts should be made.
-
getMaxAttempts
public Long getMaxAttempts()
-
setMaxAttempts
public void setMaxAttempts(Long maxAttempts)
The maximum number of attempts after which the back-off should be considered exhausted and no more attempts should be made.
-
getMultiplier
public Double getMultiplier()
-
setMultiplier
public void setMultiplier(Double multiplier)
The value to multiply the current interval by for each retry attempt.
-
builder
public static BackOff.Builder builder()
-
builder
public static BackOff.Builder builder(BackOff template)
-
-