Class ExponentialBackOffPolicy.Builder
- java.lang.Object
-
- com.google.api.client.http.ExponentialBackOffPolicy.Builder
-
- Enclosing class:
- ExponentialBackOffPolicy
@Beta @Deprecated public static class ExponentialBackOffPolicy.Builder extends java.lang.Object
Deprecated.- Since:
- 1.7
-
-
Field Summary
Fields Modifier and Type Field Description (package private) ExponentialBackOff.Builder
exponentialBackOffBuilder
Deprecated.Exponential back-off builder.
-
Constructor Summary
Constructors Modifier Constructor Description protected
Builder()
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ExponentialBackOffPolicy
build()
Deprecated.Builds a new instance ofExponentialBackOffPolicy
.int
getInitialIntervalMillis()
Deprecated.Returns the initial retry interval in milliseconds.int
getMaxElapsedTimeMillis()
Deprecated.Returns the maximum elapsed time in milliseconds.int
getMaxIntervalMillis()
Deprecated.Returns the maximum value of the back off period in milliseconds.double
getMultiplier()
Deprecated.Returns the value to multiply the current interval with for each retry attempt.NanoClock
getNanoClock()
Deprecated.Returns the nano clock.double
getRandomizationFactor()
Deprecated.Returns the randomization factor to use for creating a range around the retry interval.ExponentialBackOffPolicy.Builder
setInitialIntervalMillis(int initialIntervalMillis)
Deprecated.Sets the initial retry interval in milliseconds.ExponentialBackOffPolicy.Builder
setMaxElapsedTimeMillis(int maxElapsedTimeMillis)
Deprecated.Sets the maximum elapsed time in milliseconds.ExponentialBackOffPolicy.Builder
setMaxIntervalMillis(int maxIntervalMillis)
Deprecated.Sets the maximum value of the back off period in milliseconds.ExponentialBackOffPolicy.Builder
setMultiplier(double multiplier)
Deprecated.Sets the value to multiply the current interval with for each retry attempt.ExponentialBackOffPolicy.Builder
setNanoClock(NanoClock nanoClock)
Deprecated.Sets the nano clock (NanoClock.SYSTEM
by default).ExponentialBackOffPolicy.Builder
setRandomizationFactor(double randomizationFactor)
Deprecated.Sets the randomization factor to use for creating a range around the retry interval.
-
-
-
Field Detail
-
exponentialBackOffBuilder
final ExponentialBackOff.Builder exponentialBackOffBuilder
Deprecated.Exponential back-off builder.
-
-
Method Detail
-
build
public ExponentialBackOffPolicy 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
public ExponentialBackOffPolicy.Builder setInitialIntervalMillis(int initialIntervalMillis)
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
public ExponentialBackOffPolicy.Builder setRandomizationFactor(double randomizationFactor)
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
public ExponentialBackOffPolicy.Builder setMultiplier(double multiplier)
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
public ExponentialBackOffPolicy.Builder setMaxIntervalMillis(int maxIntervalMillis)
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
ExponentialBackOffPolicy
instance 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
public ExponentialBackOffPolicy.Builder setMaxElapsedTimeMillis(int maxElapsedTimeMillis)
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
ExponentialBackOffPolicy
instance 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
public final NanoClock getNanoClock()
Deprecated.Returns the nano clock.- Since:
- 1.14
-
setNanoClock
public ExponentialBackOffPolicy.Builder setNanoClock(NanoClock nanoClock)
Deprecated.Sets the nano clock (NanoClock.SYSTEM
by default).Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
- Since:
- 1.14
-
-