Package io.dapr.durabletask
Class TaskOptions
java.lang.Object
io.dapr.durabletask.TaskOptions
Options that can be used to control the behavior of orchestrator and activity task execution.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilder for creatingTaskOptionsinstances. -
Method Summary
Modifier and TypeMethodDescriptionstatic TaskOptions.Builderbuilder()Creates a new builder forTaskOptions.static TaskOptionscreate()Creates a newTaskOptionsobject with default values.getAppID()Gets the configured app ID value ornullif none was configured.Gets the configuredRetryHandlervalue ornullif none was configured.Gets the configuredRetryPolicyvalue ornullif none was configured.static TaskOptionsCreates a newTaskOptionsobject with the specified app ID.static TaskOptionswithRetryHandler(RetryHandler retryHandler) Creates a newTaskOptionsobject from aRetryHandler.static TaskOptionswithRetryPolicy(RetryPolicy retryPolicy) Creates a newTaskOptionsobject from aRetryPolicy.
-
Method Details
-
builder
Creates a new builder forTaskOptions.- Returns:
- a new builder instance
-
create
Creates a newTaskOptionsobject with default values.- Returns:
- a new TaskOptions instance with no configuration
-
withRetryPolicy
Creates a newTaskOptionsobject from aRetryPolicy.- Parameters:
retryPolicy- the retry policy to use in the newTaskOptionsobject.- Returns:
- a new TaskOptions instance with the specified retry policy
-
withRetryHandler
Creates a newTaskOptionsobject from aRetryHandler.- Parameters:
retryHandler- the retry handler to use in the newTaskOptionsobject.- Returns:
- a new TaskOptions instance with the specified retry handler
-
withAppID
Creates a newTaskOptionsobject with the specified app ID.- Parameters:
appID- the app ID to use for cross-app workflow routing- Returns:
- a new TaskOptions instance with the specified app ID
-
getRetryPolicy
Gets the configuredRetryPolicyvalue ornullif none was configured.- Returns:
- the configured retry policy
-
getRetryHandler
Gets the configuredRetryHandlervalue ornullif none was configured.- Returns:
- the configured retry handler.
-
getAppID
Gets the configured app ID value ornullif none was configured.- Returns:
- the configured app ID
-