Class ExponentialBackOff.Builder

    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • setInitialIntervalMillis

        public ExponentialBackOff.Builder setInitialIntervalMillis​(int initialIntervalMillis)
        Sets the initial retry interval in milliseconds. The default value is ExponentialBackOff.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()
        Returns the randomization factor to use for creating a range around the retry interval. The default value is ExponentialBackOff.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 ExponentialBackOff.Builder setRandomizationFactor​(double randomizationFactor)
        Sets the randomization factor to use for creating a range around the retry interval. The default value is ExponentialBackOff.DEFAULT_RANDOMIZATION_FACTOR. Must fall in the range 0 <= 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()
        Returns the value to multiply the current interval with for each retry attempt. The default value is ExponentialBackOff.DEFAULT_MULTIPLIER.
      • setMultiplier

        public ExponentialBackOff.Builder setMultiplier​(double multiplier)
        Sets the value to multiply the current interval with for each retry attempt. The default value is ExponentialBackOff.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()
        Returns the maximum value of the back off period in milliseconds. Once the current interval reaches this value it stops increasing. The default value is ExponentialBackOff.DEFAULT_MAX_INTERVAL_MILLIS. Must be >= initialInterval.
      • setMaxIntervalMillis

        public ExponentialBackOff.Builder setMaxIntervalMillis​(int maxIntervalMillis)
        Sets the maximum value of the back off period in milliseconds. Once the current interval reaches this value it stops increasing. The default value is ExponentialBackOff.DEFAULT_MAX_INTERVAL_MILLIS.

        Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.