Class ActivityOptions.Builder

  • Enclosing class:
    ActivityOptions

    public static final class ActivityOptions.Builder
    extends java.lang.Object
    • Constructor Detail

      • Builder

        public Builder()
      • Builder

        public Builder​(ActivityOptions options)
        Copy Builder fields from the options.
    • Method Detail

      • setScheduleToStartTimeout

        public ActivityOptions.Builder setScheduleToStartTimeout​(java.time.Duration scheduleToStartTimeout)
        Time activity can stay in task list before it is picked up by a worker. If schedule to close is not provided then both this and start to close are required.
      • setStartToCloseTimeout

        public ActivityOptions.Builder setStartToCloseTimeout​(java.time.Duration startToCloseTimeout)
        Maximum activity execution time after it was sent to a worker. If schedule to close is not provided then both this and schedule to start are required.
      • setHeartbeatTimeout

        public ActivityOptions.Builder setHeartbeatTimeout​(java.time.Duration heartbeatTimeoutSeconds)
        Heartbeat interval. Activity must heartbeat before this interval passes after a last heartbeat or activity start.
      • setTaskList

        public ActivityOptions.Builder setTaskList​(java.lang.String taskList)
        Task list to use when dispatching activity task to a worker. By default it is the same task list name the workflow was started with.
      • setRetryOptions

        public ActivityOptions.Builder setRetryOptions​(RetryOptions retryOptions)
        RetryOptions that define how activity is retried in case of failure. Default is null which is no reties.
      • setContextPropagators

        public ActivityOptions.Builder setContextPropagators​(java.util.List<ContextPropagator> contextPropagators)
        ContextPropagators help propagate the context from the workflow to the activities
      • validateAndBuildWithDefaults

        public ActivityOptions validateAndBuildWithDefaults()