Record Class ClusterHealthMonitor.HealthAlert
java.lang.Object
java.lang.Record
com.loomcache.server.cluster.ClusterHealthMonitor.HealthAlert
- Enclosing class:
ClusterHealthMonitor
public static record ClusterHealthMonitor.HealthAlert(String metric, double threshold, double currentValue, Instant timestamp, ClusterHealthMonitor.AlertSeverity severity)
extends Record
Health alert record.
-
Constructor Summary
ConstructorsConstructorDescriptionHealthAlert(String metric, double threshold, double currentValue, Instant timestamp, ClusterHealthMonitor.AlertSeverity severity) Creates an instance of aHealthAlertrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the value of thecurrentValuerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.metric()Returns the value of themetricrecord component.severity()Returns the value of theseverityrecord component.doubleReturns the value of thethresholdrecord component.Returns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
HealthAlert
public HealthAlert(String metric, double threshold, double currentValue, Instant timestamp, ClusterHealthMonitor.AlertSeverity severity) Creates an instance of aHealthAlertrecord class.- Parameters:
metric- the value for themetricrecord componentthreshold- the value for thethresholdrecord componentcurrentValue- the value for thecurrentValuerecord componenttimestamp- the value for thetimestamprecord componentseverity- the value for theseverityrecord component
-
-
Method Details
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
metric
Returns the value of themetricrecord component.- Returns:
- the value of the
metricrecord component
-
threshold
public double threshold()Returns the value of thethresholdrecord component.- Returns:
- the value of the
thresholdrecord component
-
currentValue
public double currentValue()Returns the value of thecurrentValuerecord component.- Returns:
- the value of the
currentValuerecord component
-
timestamp
Returns the value of thetimestamprecord component.- Returns:
- the value of the
timestamprecord component
-
severity
Returns the value of theseverityrecord component.- Returns:
- the value of the
severityrecord component
-