Class TaskGroup.Builder

Enclosing class:
TaskGroup

public static class TaskGroup.Builder extends ValidatedBuilder<TaskGroup>
A builder that can be used to build a new TaskGroup that is automatically validated on build.
  • Method Details

    • name

      public TaskGroup.Builder name(String name)
      Parameters:
      name - the task group name
      Returns:
      this.
    • tag

      public TaskGroup.Builder tag(String tag)
      Parameters:
      tag - the task group tag
      Returns:
      this.
    • runSpecification

      public TaskGroup.Builder runSpecification(RunSpecification runSpecification)
      Parameters:
      runSpecification - the task group run specification
      Returns:
      this.
    • priority

      public TaskGroup.Builder priority(Double priority)
      Parameters:
      priority - the task group priority
      Returns:
      this.
    • dependentOn

      public TaskGroup.Builder dependentOn(String dependentOn)
      Parameters:
      dependentOn - the name of the task group that this task group is dependent on
      Returns:
      this.
    • dependency

      public TaskGroup.Builder dependency(String dependency)
    • dependencies

      public TaskGroup.Builder dependencies(Collection<? extends String> dependencies)
    • clearDependencies

      public TaskGroup.Builder clearDependencies()
    • finishIfAllTasksFinished

      public TaskGroup.Builder finishIfAllTasksFinished(Boolean finishIfAllTasksFinished)
      Parameters:
      finishIfAllTasksFinished - if the task group should finish if all contained tasks are finished
      Returns:
      this.
    • finishIfAnyTaskFailed

      public TaskGroup.Builder finishIfAnyTaskFailed(Boolean finishIfAnyTaskFailed)
      Parameters:
      finishIfAnyTaskFailed - if the task group should finish if any contained task fails
      Returns:
      this.
    • completedTaskTtl

      public TaskGroup.Builder completedTaskTtl(Duration completedTaskTtl)
      Parameters:
      completedTaskTtl - the completed task TTL
      Returns:
      this.
    • taskTemplate

      public TaskGroup.Builder taskTemplate(TaskTemplate taskTemplate)
      Returns:
      this.
    • buildUnchecked

      public TaskGroup buildUnchecked()
      Description copied from class: ValidatedBuilder
      Builds the object without enforcing validation constraints. Use this when the object is validated later, for example as part of an enclosing object built with ValidatedBuilder.build(), or when it does not need to be valid on its own.
      Overrides:
      buildUnchecked in class ValidatedBuilder<TaskGroup>
      Returns:
      the object being built
    • toString

      public String toString()
      Overrides:
      toString in class Object