Class TaskOptions

java.lang.Object
io.dapr.durabletask.TaskOptions

public final class TaskOptions extends Object
Options that can be used to control the behavior of orchestrator and activity task execution.
  • Method Details

    • builder

      public static TaskOptions.Builder builder()
      Creates a new builder for TaskOptions.
      Returns:
      a new builder instance
    • create

      public static TaskOptions create()
      Creates a new TaskOptions object with default values.
      Returns:
      a new TaskOptions instance with no configuration
    • withRetryPolicy

      public static TaskOptions withRetryPolicy(RetryPolicy retryPolicy)
      Creates a new TaskOptions object from a RetryPolicy.
      Parameters:
      retryPolicy - the retry policy to use in the new TaskOptions object.
      Returns:
      a new TaskOptions instance with the specified retry policy
    • withRetryHandler

      public static TaskOptions withRetryHandler(RetryHandler retryHandler)
      Creates a new TaskOptions object from a RetryHandler.
      Parameters:
      retryHandler - the retry handler to use in the new TaskOptions object.
      Returns:
      a new TaskOptions instance with the specified retry handler
    • withAppID

      public static TaskOptions withAppID(String appID)
      Creates a new TaskOptions object 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

      public RetryPolicy getRetryPolicy()
      Gets the configured RetryPolicy value or null if none was configured.
      Returns:
      the configured retry policy
    • getRetryHandler

      public RetryHandler getRetryHandler()
      Gets the configured RetryHandler value or null if none was configured.
      Returns:
      the configured retry handler.
    • getAppID

      public String getAppID()
      Gets the configured app ID value or null if none was configured.
      Returns:
      the configured app ID