Record Class AgentRecoveryManager.HealthStatus
java.lang.Object
java.lang.Record
com.tnsai.coordination.supervisor.AgentRecoveryManager.HealthStatus
- Enclosing class:
AgentRecoveryManager
public static record AgentRecoveryManager.HealthStatus(String agentId, boolean healthy, String reason, Instant checkedAt)
extends Record
Agent health status snapshot.
-
Constructor Summary
ConstructorsConstructorDescriptionHealthStatus(String agentId, boolean healthy, String reason, Instant checkedAt) Creates an instance of aHealthStatusrecord class. -
Method Summary
Modifier and TypeMethodDescriptionagentId()Returns the value of theagentIdrecord component.Returns the value of thecheckedAtrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanhealthy()Returns the value of thehealthyrecord component.reason()Returns the value of thereasonrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
HealthStatus
Creates an instance of aHealthStatusrecord class.- Parameters:
agentId- the value for theagentIdrecord componenthealthy- the value for thehealthyrecord componentreason- the value for thereasonrecord componentcheckedAt- the value for thecheckedAtrecord 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 '=='. -
agentId
Returns the value of theagentIdrecord component.- Returns:
- the value of the
agentIdrecord component
-
healthy
public boolean healthy()Returns the value of thehealthyrecord component.- Returns:
- the value of the
healthyrecord component
-
reason
Returns the value of thereasonrecord component.- Returns:
- the value of the
reasonrecord component
-
checkedAt
Returns the value of thecheckedAtrecord component.- Returns:
- the value of the
checkedAtrecord component
-