Class StartActivityOptions.Builder
java.lang.Object
io.temporal.client.StartActivityOptions.Builder
- Enclosing class:
StartActivityOptions
-
Method Summary
Modifier and TypeMethodDescriptionbuild()setHeartbeatTimeout(Duration heartbeatTimeout) Maximum time between heartbeats before the server considers the activity failed.Required.setIdConflictPolicy(io.temporal.api.enums.v1.ActivityIdConflictPolicy idConflictPolicy) Controls behavior when an activity with the same ID is currently running.setIdReusePolicy(io.temporal.api.enums.v1.ActivityIdReusePolicy idReusePolicy) Controls behavior when an activity with the same ID was previously run and is now closed.setPriority(Priority priority) Priority hint for task routing.setRetryOptions(RetryOptions retryOptions) Retry policy.setScheduleToCloseTimeout(Duration scheduleToCloseTimeout) Total time the caller is willing to wait for the activity to complete (including all retries).setScheduleToStartTimeout(Duration scheduleToStartTimeout) Time the activity task may wait in the task queue before a worker picks it up.setStartDelay(Duration startDelay) Time to wait before dispatching the first activity task.setStartToCloseTimeout(Duration startToCloseTimeout) Maximum time for a single attempt.setStaticDetails(String staticDetails) Longer static details for UI display; encoded as a payload in UserMetadata.setStaticSummary(String staticSummary) Short static summary for UI display; encoded as a payload in UserMetadata.setTaskQueue(String taskQueue) Required.setTypedSearchAttributes(SearchAttributes typedSearchAttributes) Typed search attributes to attach to this activity execution.
-
Method Details
-
setId
Required. A unique identifier for this activity in the namespace. -
setTaskQueue
Required. The task queue that workers will poll for this activity. -
setScheduleToCloseTimeout
Total time the caller is willing to wait for the activity to complete (including all retries). Either this orsetStartToCloseTimeout(Duration)is required. -
setScheduleToStartTimeout
Time the activity task may wait in the task queue before a worker picks it up. Non-retryable. -
setStartToCloseTimeout
Maximum time for a single attempt. Either this orsetScheduleToCloseTimeout(Duration)is required. -
setHeartbeatTimeout
Maximum time between heartbeats before the server considers the activity failed. -
setIdReusePolicy
public StartActivityOptions.Builder setIdReusePolicy(io.temporal.api.enums.v1.ActivityIdReusePolicy idReusePolicy) Controls behavior when an activity with the same ID was previously run and is now closed. Defaults toALLOW_DUPLICATE. -
setIdConflictPolicy
public StartActivityOptions.Builder setIdConflictPolicy(io.temporal.api.enums.v1.ActivityIdConflictPolicy idConflictPolicy) Controls behavior when an activity with the same ID is currently running. Defaults toUNSPECIFIEDwhich maps to the server default (fail). -
setRetryOptions
Retry policy. If not set the server default is used. -
setTypedSearchAttributes
public StartActivityOptions.Builder setTypedSearchAttributes(SearchAttributes typedSearchAttributes) Typed search attributes to attach to this activity execution. -
setStaticSummary
Short static summary for UI display; encoded as a payload in UserMetadata. -
setStaticDetails
Longer static details for UI display; encoded as a payload in UserMetadata. -
setPriority
Priority hint for task routing. -
setStartDelay
Time to wait before dispatching the first activity task. The delay is one-shot — retry attempts do not re-apply it.ScheduleToStartandScheduleToClosetimeouts begin counting only after the delay elapses. Must be non-negative;nullorDuration.ZEROmean no delay. -
build
-