Record Class WorkerRecord
java.lang.Object
java.lang.Record
ch.so.agi.gretl.control.server.persistence.WorkerRecord
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of theactiveRunsrecord component.intcapacity()Returns the value of thecapacityrecord component.Returns the value of thedisplayNamerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.labels()Returns the value of thelabelsrecord component.Returns the value of thelastHeartbeatrecord component.ch.so.agi.gretl.control.api.WorkerStatusstatus()Returns the value of thestatusrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
WorkerRecord
public WorkerRecord(String id, String displayName, List<String> labels, int capacity, int activeRuns, Instant lastHeartbeat, ch.so.agi.gretl.control.api.WorkerStatus status) Creates an instance of aWorkerRecordrecord class.- Parameters:
id- the value for theidrecord componentdisplayName- the value for thedisplayNamerecord componentlabels- the value for thelabelsrecord componentcapacity- the value for thecapacityrecord componentactiveRuns- the value for theactiveRunsrecord componentlastHeartbeat- the value for thelastHeartbeatrecord componentstatus- the value for thestatusrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
displayName
Returns the value of thedisplayNamerecord component.- Returns:
- the value of the
displayNamerecord component
-
labels
Returns the value of thelabelsrecord component.- Returns:
- the value of the
labelsrecord component
-
capacity
public int capacity()Returns the value of thecapacityrecord component.- Returns:
- the value of the
capacityrecord component
-
activeRuns
public int activeRuns()Returns the value of theactiveRunsrecord component.- Returns:
- the value of the
activeRunsrecord component
-
lastHeartbeat
Returns the value of thelastHeartbeatrecord component.- Returns:
- the value of the
lastHeartbeatrecord component
-
status
public ch.so.agi.gretl.control.api.WorkerStatus status()Returns the value of thestatusrecord component.- Returns:
- the value of the
statusrecord component
-