Package io.temporal.common
Annotation Type MethodRetry
-
@Retention(RUNTIME) @Target(METHOD) public @interface MethodRetrySpecifies 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. IfRetryOptionsare present onActivityOptionsorChildWorkflowOptionsthe fields that are not default take precedence over parameters of this annotation.
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description doublebackoffCoefficientCoefficient used to calculate the next retry interval.java.lang.String[]doNotRetryList of failure types to not retry.longinitialIntervalSecondsInterval of the first retry.intmaximumAttemptsMaximum number of attempts.longmaximumIntervalSecondsMaximum 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:
- {}
-
-