Class Worker

java.lang.Object
co.yellowdog.platform.model.Worker
All Implemented Interfaces:
Identified, Serializable

public class Worker extends Object implements Identified, Serializable
Describes a Worker managed by the YellowDog Scheduler service.
See Also:
  • Method Details

    • builder

      public static Worker.Builder builder()
    • getId

      public String getId()
      Description copied from interface: Identified
      Returns the ID
      Specified by:
      getId in interface Identified
      Returns:
      the ID
    • getStatus

      public WorkerStatus getStatus()
      The status of the worker.
      Returns:
      the status of the worker
    • getTaskGroupId

      public String getTaskGroupId()
      The ID of the task group that has a claim on the worker. Should only be set if the Worker is exclusively claimed by a single TaskGroup.
      Returns:
      indicates if the worker is exclusively claimed by a single task group
    • getRegisteredTime

      public Instant getRegisteredTime()
      The time at which the worker was registered.
      Returns:
      the time at which the worker was registered
    • setId

      public void setId(String id)
    • setStatus

      public void setStatus(WorkerStatus status)
      The status of the worker.
      Parameters:
      status - the status of the worker
    • setTaskGroupId

      public void setTaskGroupId(String taskGroupId)
      The ID of the task group that has a claim on the worker. Should only be set if the Worker is exclusively claimed by a single TaskGroup.
      Parameters:
      exclusive - indicates if the worker is exclusively claimed by a single task group
    • setRegisteredTime

      public void setRegisteredTime(Instant registeredTime)
      The time at which the worker was registered.
      Parameters:
      registeredTime - the time at which the worker was registered
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object