Class Worker.Builder
java.lang.Object
co.yellowdog.platform.model.Worker.Builder
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
claimCount
(int claimCount) A count of the tasks groups which have claims on the worker.currentTaskId
(String currentTaskId) The ID of the task currently allocated to the worker.exclusive
(boolean exclusive) Indicates if the worker is exclusively claimed by a single task group.registeredTime
(Instant registeredTime) The time at which the worker was registered.status
(WorkerStatus status) The status of the worker.taskGroupIds
(List<String> taskGroupIds) The IDs of the task groups which have claims on the worker.toString()
-
Method Details
-
id
- Returns:
this
.
-
status
The status of the worker.- Parameters:
status
- the status of the worker- Returns:
this
.
-
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
A count of the tasks groups which have claims on the worker. Always identical to the size oftaskGroupIds
.- Parameters:
claimCount
- the count of the task groups which have claims on the worker- Returns:
this
.
-
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
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
The time at which the worker was registered.- Parameters:
registeredTime
- the time at which the worker was registered- Returns:
this
.
-
build
-
toString
-