Class Worker
java.lang.Object
co.yellowdog.platform.model.Worker
- All Implemented Interfaces:
Identified
,Serializable
Describes a Worker managed by the YellowDog Scheduler service.
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic Worker.Builder
builder()
protected boolean
boolean
int
A count of the tasks groups which have claims on the worker.The ID of the task currently allocated to the worker.getId()
Returns the IDThe time at which the worker was registered.The status of the worker.The IDs of the task groups which have claims on the worker.int
hashCode()
boolean
Indicates if the worker is exclusively claimed by a single task group.void
setClaimCount
(int claimCount) A count of the tasks groups which have claims on the worker.void
setCurrentTaskId
(String currentTaskId) The ID of the task currently allocated to the worker.void
setExclusive
(boolean exclusive) Indicates if the worker is exclusively claimed by a single task group.void
void
setRegisteredTime
(Instant registeredTime) The time at which the worker was registered.void
setStatus
(WorkerStatus status) The status of the worker.void
setTaskGroupIds
(List<String> taskGroupIds) The IDs of the task groups which have claims on the worker.toString()
-
Method Details
-
builder
-
getId
Description copied from interface:Identified
Returns the ID- Specified by:
getId
in interfaceIdentified
- Returns:
- the ID
-
getStatus
-
getTaskGroupIds
-
getClaimCount
public int getClaimCount()A count of the tasks groups which have claims on the worker. Always identical to the size oftaskGroupIds
.- Returns:
- the count of the task groups which have claims on the worker
-
isExclusive
public boolean isExclusive()Indicates if the worker is exclusively claimed by a single task group.- Returns:
- indicates if the worker is exclusively claimed by a single task group
-
getCurrentTaskId
The ID of the task currently allocated to the worker.- Returns:
- the ID of the task currently allocated to the worker
-
getRegisteredTime
The time at which the worker was registered.- Returns:
- the time at which the worker was registered
-
setId
-
setStatus
The status of the worker.- Parameters:
status
- the status of the worker
-
setTaskGroupIds
-
setClaimCount
public void setClaimCount(int 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
-
setExclusive
public void setExclusive(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
-
setCurrentTaskId
The ID of the task currently allocated to the worker.- Parameters:
currentTaskId
- the ID of the task currently allocated to the worker
-
setRegisteredTime
The time at which the worker was registered.- Parameters:
registeredTime
- the time at which the worker was registered
-
equals
-
canEqual
-
hashCode
-
toString
-