public static final class ActivityOptions.Builder
extends java.lang.Object
Constructor and Description |
---|
Builder() |
Builder(ActivityOptions options)
Copy Builder fields from the options.
|
Modifier and Type | Method and Description |
---|---|
ActivityOptions |
build() |
ActivityOptions.Builder |
setContextPropagators(java.util.List<ContextPropagator> contextPropagators)
ContextPropagators help propagate the context from the workflow to the activities
|
ActivityOptions.Builder |
setHeartbeatTimeout(java.time.Duration heartbeatTimeoutSeconds)
Heartbeat interval.
|
ActivityOptions.Builder |
setRetryOptions(RetryOptions retryOptions)
RetryOptions that define how activity is retried in case of failure.
|
ActivityOptions.Builder |
setScheduleToCloseTimeout(java.time.Duration scheduleToCloseTimeout)
Overall timeout workflow is willing to wait for activity to complete.
|
ActivityOptions.Builder |
setScheduleToStartTimeout(java.time.Duration scheduleToStartTimeout)
Time activity can stay in task list before it is picked up by a worker.
|
ActivityOptions.Builder |
setStartToCloseTimeout(java.time.Duration startToCloseTimeout)
Maximum activity execution time after it was sent to a worker.
|
ActivityOptions.Builder |
setTaskList(java.lang.String taskList)
Task list to use when dispatching activity task to a worker.
|
ActivityOptions |
validateAndBuildWithDefaults() |
public Builder()
public Builder(ActivityOptions options)
public ActivityOptions.Builder setScheduleToCloseTimeout(java.time.Duration scheduleToCloseTimeout)
setScheduleToStartTimeout(Duration)
to limit it) plus activity
execution time (use setStartToCloseTimeout(Duration)
to limit it). Either this
option or both schedule to start and start to close are required.public ActivityOptions.Builder setScheduleToStartTimeout(java.time.Duration scheduleToStartTimeout)
public ActivityOptions.Builder setStartToCloseTimeout(java.time.Duration startToCloseTimeout)
public ActivityOptions.Builder setHeartbeatTimeout(java.time.Duration heartbeatTimeoutSeconds)
public ActivityOptions.Builder setTaskList(java.lang.String taskList)
public ActivityOptions.Builder setRetryOptions(RetryOptions retryOptions)
public ActivityOptions.Builder setContextPropagators(java.util.List<ContextPropagator> contextPropagators)
public ActivityOptions build()
public ActivityOptions validateAndBuildWithDefaults()