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.BuilderexponentialBackOffBuilderDeprecated.Exponential back-off builder.
-
Constructor Summary
Constructors Modifier Constructor Description protectedBuilder()Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ExponentialBackOffPolicybuild()Deprecated.Builds a new instance ofExponentialBackOffPolicy.intgetInitialIntervalMillis()Deprecated.Returns the initial retry interval in milliseconds.intgetMaxElapsedTimeMillis()Deprecated.Returns the maximum elapsed time in milliseconds.intgetMaxIntervalMillis()Deprecated.Returns the maximum value of the back off period in milliseconds.doublegetMultiplier()Deprecated.Returns the value to multiply the current interval with for each retry attempt.NanoClockgetNanoClock()Deprecated.Returns the nano clock.doublegetRandomizationFactor()Deprecated.Returns the randomization factor to use for creating a range around the retry interval.ExponentialBackOffPolicy.BuildersetInitialIntervalMillis(int initialIntervalMillis)Deprecated.Sets the initial retry interval in milliseconds.ExponentialBackOffPolicy.BuildersetMaxElapsedTimeMillis(int maxElapsedTimeMillis)Deprecated.Sets the maximum elapsed time in milliseconds.ExponentialBackOffPolicy.BuildersetMaxIntervalMillis(int maxIntervalMillis)Deprecated.Sets the maximum value of the back off period in milliseconds.ExponentialBackOffPolicy.BuildersetMultiplier(double multiplier)Deprecated.Sets the value to multiply the current interval with for each retry attempt.ExponentialBackOffPolicy.BuildersetNanoClock(NanoClock nanoClock)Deprecated.Sets the nano clock (NanoClock.SYSTEMby default).ExponentialBackOffPolicy.BuildersetRandomizationFactor(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
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
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
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
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.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
-
-