Annotation Interface MethodRetry
Specifies a retry policy for a workflow or activity method. This annotation applies only to
activity or workflow interface methods. For workflows currently used only for child workflow
retries. Not required. When not used either retries don't happen or they are configured through
correspondent options. If
RetryOptions are present on ActivityOptions or ChildWorkflowOptions the fields that are not
default take precedence over parameters of this annotation.-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptiondoubleCoefficient used to calculate the next retry interval.String[]List of failure types to not retry.longInterval of the first retry.intMaximum number of attempts.longMaximum interval between retries.
-
Element Details
-
initialIntervalSeconds
long initialIntervalSecondsInterval of the first retry. If coefficient is 1.0 then it is used for all retries. If not specified here must be provided throughRetryOptions.Builder.setInitialInterval(Duration).- Default:
0L
-
backoffCoefficient
double backoffCoefficientCoefficient used to calculate the next retry interval. The next retry interval is previous interval multiplied by this coefficient. Must be 1 or larger. Default is 2.0.- Default:
0.0
-
maximumAttempts
int maximumAttemptsMaximum number of attempts. When exceeded the retries stop even if not expired yet. Must be 1 or bigger. Default is unlimited.- Default:
0
-
maximumIntervalSeconds
long maximumIntervalSecondsMaximum interval between retries. Exponential backoff leads to interval increase. This value is the cap of the increase. Default is 100xinitialIntervalSeconds().- Default:
0L
-
doNotRetry
String[] doNotRetryList of failure types to not retry. The failure type of an exception is its full class name. It can be also explicitly specified by throwing anApplicationFailure- Default:
{}
-