Package io.temporal.common
Annotation Type MethodRetry
-
@Retention(RUNTIME) @Target(METHOD) public @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. IfRetryOptions
are present onActivityOptions
orChildWorkflowOptions
the fields that are not default take precedence over parameters of this annotation.
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description double
backoffCoefficient
Coefficient used to calculate the next retry interval.java.lang.String[]
doNotRetry
List of failure types to not retry.long
initialIntervalSeconds
Interval of the first retry.int
maximumAttempts
Maximum number of attempts.long
maximumIntervalSeconds
Maximum interval between retries.
-
-
-
Element Detail
-
initialIntervalSeconds
long initialIntervalSeconds
Interval 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
-
-
-
maximumIntervalSeconds
long maximumIntervalSeconds
Maximum interval between retries. Exponential backoff leads to interval increase. This value is the cap of the increase. Default is 100xinitialIntervalSeconds()
.- Default:
- 0L
-
-
-
doNotRetry
java.lang.String[] doNotRetry
List 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:
- {}
-
-