Package io.pravega.common.util
Class Retry.RetryWithBackoff
- java.lang.Object
-
- io.pravega.common.util.Retry.RetryWithBackoff
-
- Enclosing class:
- Retry
public static final class Retry.RetryWithBackoff extends java.lang.ObjectReturned byRetry.withExpBackoff(long, int, int)to set the retry schedule. Used to invokeretryingOn(Class). Note this object is reusable so this can be done more than once.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetAttempts()longgetInitialMillis()longgetMaxDelay()intgetMultiplier()<RetryT extends java.lang.Exception>
Retry.RetryExceptionally<RetryT>retryingOn(java.lang.Class<RetryT> retryType)Retry.RetryAndThrowConditionallyretryWhen(java.util.function.Predicate<java.lang.Throwable> predicate)Retry.RetryWithBackoffwithAttempts(int attempts)Retry.RetryWithBackoffwithInitialMillis(long initialMillis)Retry.RetryWithBackoffwithMaxDelay(long maxDelay)Retry.RetryWithBackoffwithMultiplier(int multiplier)
-
-
-
Method Detail
-
retryingOn
public <RetryT extends java.lang.Exception> Retry.RetryExceptionally<RetryT> retryingOn(java.lang.Class<RetryT> retryType)
-
retryWhen
public Retry.RetryAndThrowConditionally retryWhen(java.util.function.Predicate<java.lang.Throwable> predicate)
-
getInitialMillis
public long getInitialMillis()
-
withInitialMillis
public Retry.RetryWithBackoff withInitialMillis(long initialMillis)
-
getMultiplier
public int getMultiplier()
-
withMultiplier
public Retry.RetryWithBackoff withMultiplier(int multiplier)
-
getAttempts
public int getAttempts()
-
withAttempts
public Retry.RetryWithBackoff withAttempts(int attempts)
-
getMaxDelay
public long getMaxDelay()
-
withMaxDelay
public Retry.RetryWithBackoff withMaxDelay(long maxDelay)
-
-