Class ExponentialBackOffPolicy.Builder
- Enclosing class:
ExponentialBackOffPolicy
- Since:
- 1.7
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final ExponentialBackOff.BuilderDeprecated.Exponential back-off builder. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Deprecated.Builds a new instance ofExponentialBackOffPolicy.final intDeprecated.Returns the initial retry interval in milliseconds.final intDeprecated.Returns the maximum elapsed time in milliseconds.final intDeprecated.Returns the maximum value of the back off period in milliseconds.final doubleDeprecated.Returns the value to multiply the current interval with for each retry attempt.final NanoClockDeprecated.Returns the nano clock.final doubleDeprecated.Returns the randomization factor to use for creating a range around the retry interval.setInitialIntervalMillis(int initialIntervalMillis) Deprecated.Sets the initial retry interval in milliseconds.setMaxElapsedTimeMillis(int maxElapsedTimeMillis) Deprecated.Sets the maximum elapsed time in milliseconds.setMaxIntervalMillis(int maxIntervalMillis) Deprecated.Sets the maximum value of the back off period in milliseconds.setMultiplier(double multiplier) Deprecated.Sets the value to multiply the current interval with for each retry attempt.setNanoClock(NanoClock nanoClock) Deprecated.Sets the nano clock (NanoClock.SYSTEMby default).setRandomizationFactor(double randomizationFactor) Deprecated.Sets the randomization factor to use for creating a range around the retry interval.
-
Field Details
-
exponentialBackOffBuilder
Deprecated.Exponential back-off builder.
-
-
Constructor Details
-
Builder
protected Builder()Deprecated.
-
-
Method Details
-
build
Deprecated.Builds a new instance ofExponentialBackOffPolicy. -
getInitialIntervalMillis
public final int getInitialIntervalMillis()Deprecated.Returns the initial retry interval in milliseconds. The default value isExponentialBackOffPolicy.DEFAULT_INITIAL_INTERVAL_MILLIS. -
setInitialIntervalMillis
Deprecated.Sets the initial retry interval in milliseconds. The default value isExponentialBackOffPolicy.DEFAULT_INITIAL_INTERVAL_MILLIS. Must be> 0.Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
-
getRandomizationFactor
public final double getRandomizationFactor()Deprecated.Returns the randomization factor to use for creating a range around the retry interval. The default value isExponentialBackOffPolicy.DEFAULT_RANDOMIZATION_FACTOR.A randomization factor of 0.5 results in a random period ranging between 50% below and 50% above the retry interval.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
-
setRandomizationFactor
Deprecated.Sets the randomization factor to use for creating a range around the retry interval. The default value isExponentialBackOffPolicy.DEFAULT_RANDOMIZATION_FACTOR. Must fall in the range0 <= randomizationFactor < 1.A randomization factor of 0.5 results in a random period ranging between 50% below and 50% above the retry interval.
Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
-
getMultiplier
public final double getMultiplier()Deprecated.Returns the value to multiply the current interval with for each retry attempt. The default value isExponentialBackOffPolicy.DEFAULT_MULTIPLIER. -
setMultiplier
Deprecated.Sets the value to multiply the current interval with for each retry attempt. The default value isExponentialBackOffPolicy.DEFAULT_MULTIPLIER. Must be>= 1.Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
-
getMaxIntervalMillis
public final int getMaxIntervalMillis()Deprecated.Returns the maximum value of the back off period in milliseconds. Once the current interval reaches this value it stops increasing. The default value isExponentialBackOffPolicy.DEFAULT_MAX_INTERVAL_MILLIS. Must be>= initialInterval. -
setMaxIntervalMillis
Deprecated.Sets the maximum value of the back off period in milliseconds. Once the current interval reaches this value it stops increasing. The default value isExponentialBackOffPolicy.DEFAULT_MAX_INTERVAL_MILLIS.Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
-
getMaxElapsedTimeMillis
public final int getMaxElapsedTimeMillis()Deprecated.Returns the maximum elapsed time in milliseconds. The default value isExponentialBackOffPolicy.DEFAULT_MAX_ELAPSED_TIME_MILLIS.If the time elapsed since an
ExponentialBackOffPolicyinstance is created goes past the max_elapsed_time then the methodExponentialBackOffPolicy.getNextBackOffMillis()starts returningBackOffPolicy.STOP. The elapsed time can be reset by callingExponentialBackOffPolicy.reset(). -
setMaxElapsedTimeMillis
Deprecated.Sets the maximum elapsed time in milliseconds. The default value isExponentialBackOffPolicy.DEFAULT_MAX_ELAPSED_TIME_MILLIS. Must be> 0.If the time elapsed since an
ExponentialBackOffPolicyinstance is created goes past the max_elapsed_time then the methodExponentialBackOffPolicy.getNextBackOffMillis()starts returningBackOffPolicy.STOP. The elapsed time can be reset by callingExponentialBackOffPolicy.reset().Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
-
getNanoClock
-
setNanoClock
Deprecated.Sets the nano clock (NanoClock.SYSTEMby default).Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
- Since:
- 1.14
-