Class RetryOptions
java.lang.Object
io.temporal.common.RetryOptions
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionlongcalculateSleepTime(long attempt) booleandoublestatic RetryOptionsString[]intinthashCode()static RetryOptionsmerge(MethodRetry r, RetryOptions o) Merges annotation with explicitly provided RetryOptions.The parameter options takes precedence.static RetryOptions.Builderstatic RetryOptions.BuildernewBuilder(RetryOptions options) Creates builder with fields pre-populated from passed options.booleanshouldRethrow(Throwable e, Optional<Duration> expiration, long attempt, long elapsed, long sleepTime) toString()
-
Method Details
-
newBuilder
-
newBuilder
Creates builder with fields pre-populated from passed options.- Parameters:
options- can be null
-
getDefaultInstance
-
merge
Merges annotation with explicitly provided RetryOptions. If there is conflict RetryOptions takes precedence. -
merge
The parameter options takes precedence. -
getInitialInterval
-
getBackoffCoefficient
public double getBackoffCoefficient() -
getMaximumAttempts
public int getMaximumAttempts() -
getMaximumInterval
-
getDoNotRetry
- Returns:
- null if not configured. When merging with annotation it makes a difference. null means use values from an annotation. Empty list means do not retry on anything.
-
toBuilder
-
toString
-
equals
-
hashCode
-
calculateSleepTime
public long calculateSleepTime(long attempt) -
shouldRethrow
-