Class Worker.Builder
java.lang.Object
co.yellowdog.platform.model.Worker.Builder
- Enclosing class:
Worker
-
Method Summary
Modifier and TypeMethodDescriptionbatchAllocation(boolean batchAllocation) Indicates if the worker has been claimed by a task group for batch allocation.build()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.
-
batchAllocation
Indicates if the worker has been claimed by a task group for batch allocation. Tasks will be allocated to the worker's node in batches before being distributed to the worker.- Parameters:
batchAllocation- indicates if the worker has been claimed by a task group for batch- 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
-