Class ExponentialBackoffStrategy
Object
org.apache.spark.sql.pipelines.util.ExponentialBackoffStrategy
- All Implemented Interfaces:
Serializable
,BackoffStrategy
,scala.Equals
,scala.Product
public class ExponentialBackoffStrategy
extends Object
implements BackoffStrategy, scala.Product, Serializable
A
BackoffStrategy
where the back-off time grows exponentially for each
successive retry.
The back-off time after n
failures is min(maxTime, (2 ** n) * stepSize).
param: maxTime Maximum back-off time. param: stepSize Minimum step size to increment back-off.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionExponentialBackoffStrategy
(scala.concurrent.duration.FiniteDuration maxTime, scala.concurrent.duration.FiniteDuration stepSize) -
Method Summary
Modifier and TypeMethodDescriptionabstract static R
apply
(T1 v1, T2 v2) scala.concurrent.duration.FiniteDuration
maxTime()
scala.concurrent.duration.FiniteDuration
stepSize()
static String
toString()
scala.concurrent.duration.FiniteDuration
waitDuration
(int numFailures) Returns the amount of time to wait after `numFailures` failures.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface scala.Equals
canEqual, equals
Methods inherited from interface scala.Product
productArity, productElement, productElementName, productElementNames, productIterator, productPrefix
-
Constructor Details
-
ExponentialBackoffStrategy
public ExponentialBackoffStrategy(scala.concurrent.duration.FiniteDuration maxTime, scala.concurrent.duration.FiniteDuration stepSize)
-
-
Method Details
-
apply
public abstract static R apply(T1 v1, T2 v2) -
toString
-
maxTime
public scala.concurrent.duration.FiniteDuration maxTime() -
stepSize
public scala.concurrent.duration.FiniteDuration stepSize() -
waitDuration
public scala.concurrent.duration.FiniteDuration waitDuration(int numFailures) Description copied from interface:BackoffStrategy
Returns the amount of time to wait after `numFailures` failures.- Specified by:
waitDuration
in interfaceBackoffStrategy
-