Class LocalActivityOptions.Builder
- Enclosing class:
LocalActivityOptions
-
Method Summary
Modifier and TypeMethodDescriptionbuild()mergeActivityOptions(LocalActivityOptions override) setDoNotIncludeArgumentsIntoMarker(boolean doNotIncludeArgumentsIntoMarker) When set to true, the serialized arguments of the local Activity are not included in the Marker Event that stores the local Activity's invocation result.setLocalRetryThreshold(Duration localRetryThreshold) Maximum time to wait between retries locally, while keeping the Workflow Task open via a Heartbeat.MergesMethodRetryannotation.setRetryOptions(RetryOptions retryOptions) RetryOptionsthat define how an Activity is retried in case of failure.setScheduleToCloseTimeout(Duration timeout) Total time that a workflow is willing to wait for an Activity to complete.setScheduleToStartTimeout(Duration timeout) Time that the Activity Task can stay in the Worker's internal Task Queue of Local Activities until it's picked up by the Local Activity Executor.setStartToCloseTimeout(Duration timeout) Maximum time of a single Activity attempt.setSummary(String summary) Single-line fixed summary for this activity that will appear in UI/CLI.
-
Method Details
-
setScheduleToCloseTimeout
Total time that a workflow is willing to wait for an Activity to complete.ScheduleToCloseTimeout limits the total time of an Activity's execution including retries (use
setStartToCloseTimeout(Duration)to limit the time of a single attempt).Either this option or
setStartToCloseTimeout(Duration)is required.Defaults to unlimited.
-
setScheduleToStartTimeout
Time that the Activity Task can stay in the Worker's internal Task Queue of Local Activities until it's picked up by the Local Activity Executor.ScheduleToStartTimeout is always non-retryable. Retrying after this timeout doesn't make sense as it would just put the Activity Task back into the same Task Queue.
Defaults to unlimited.
-
setStartToCloseTimeout
Maximum time of a single Activity attempt.If
setScheduleToCloseTimeout(Duration)is not provided, then this timeout is required. -
setLocalRetryThreshold
Maximum time to wait between retries locally, while keeping the Workflow Task open via a Heartbeat. If the delay between the attempts becomes larger that this threshold, a Workflow Timer will be scheduled. Default value is Workflow Task Timeout multiplied by 3. -
setRetryOptions
RetryOptionsthat define how an Activity is retried in case of failure.If not provided, the default activity retry policy is:
InitialInterval: 1 second BackoffCoefficient: 2 MaximumInterval: 100 seconds // 100 * InitialInterval MaximumAttempts: 0 // Unlimited NonRetryableErrorTypes: []If both
setScheduleToCloseTimeout(Duration)andRetryOptions.Builder.setMaximumAttempts(int)are not set, the Activity will not be retried.To ensure zero retries, set
RetryOptions.Builder.setMaximumAttempts(int)to 1. -
setMethodRetry
MergesMethodRetryannotation. The values of this builder take precedence over annotated ones. -
setDoNotIncludeArgumentsIntoMarker
public LocalActivityOptions.Builder setDoNotIncludeArgumentsIntoMarker(boolean doNotIncludeArgumentsIntoMarker) When set to true, the serialized arguments of the local Activity are not included in the Marker Event that stores the local Activity's invocation result. The serialized arguments are included only for human troubleshooting as they are never read by the SDK code. In some cases, it is better to not include them to reduce the history size. The default value is set to false. -
setSummary
Single-line fixed summary for this activity that will appear in UI/CLI. This can be in single-line Temporal Markdown format.Default is none/empty.
-
mergeActivityOptions
-
build
-
validateAndBuildWithDefaults
-