Class Worker.Builder

java.lang.Object
co.yellowdog.platform.model.Worker.Builder
Enclosing class:
Worker

public static class Worker.Builder extends Object
  • Method Details

    • id

      public Worker.Builder id(String id)
      Returns:
      this.
    • status

      public Worker.Builder status(WorkerStatus status)
      The status of the worker.
      Parameters:
      status - the status of the worker
      Returns:
      this.
    • taskGroupIds

      public Worker.Builder taskGroupIds(List<String> taskGroupIds)
      The IDs of the task groups which have claims on the worker.
      Parameters:
      taskGroupIds - the IDs of the task groups which have claims on the worker
      Returns:
      this.
    • claimCount

      public Worker.Builder claimCount(int claimCount)
      A count of the tasks groups which have claims on the worker. Always identical to the size of taskGroupIds.
      Parameters:
      claimCount - the count of the task groups which have claims on the worker
      Returns:
      this.
    • exclusive

      public Worker.Builder exclusive(boolean exclusive)
      Indicates if the worker is exclusively claimed by a single task group.
      Parameters:
      exclusive - indicates if the worker is exclusively claimed by a single task group
      Returns:
      this.
    • currentTaskId

      public Worker.Builder currentTaskId(String currentTaskId)
      The ID of the task currently allocated to the worker.
      Parameters:
      currentTaskId - the ID of the task currently allocated to the worker
      Returns:
      this.
    • registeredTime

      public Worker.Builder registeredTime(Instant registeredTime)
      The time at which the worker was registered.
      Parameters:
      registeredTime - the time at which the worker was registered
      Returns:
      this.
    • build

      public Worker build()
    • toString

      public String toString()
      Overrides:
      toString in class Object