Record Class ConnectionHealthMonitor.HealthMetrics
java.lang.Object
java.lang.Record
com.loomcache.server.network.ConnectionHealthMonitor.HealthMetrics
- Record Components:
totalConnections- total number of connections being monitoredhealthyCount- number of healthy connectionsdegradedCount- number of degraded connectionsunhealthyCount- number of unhealthy connectionsaverageLatencyMs- average latency across all connectionsmaxLatencyMs- maximum latency observedminLatencyMs- minimum latency observedaverageErrorRate- average error rate across all connectionslastCheckTime- timestamp of last health check
- Enclosing class:
ConnectionHealthMonitor
public static record ConnectionHealthMonitor.HealthMetrics(int totalConnections, int healthyCount, int degradedCount, int unhealthyCount, double averageLatencyMs, long maxLatencyMs, long minLatencyMs, double averageErrorRate, Instant lastCheckTime)
extends Record
Record containing comprehensive metrics for all monitored connections.
- Version:
- 1.0
- Author:
- ConnectionHealthMonitor Implementation
-
Constructor Summary
ConstructorsConstructorDescriptionHealthMetrics(int totalConnections, int healthyCount, int degradedCount, int unhealthyCount, double averageLatencyMs, long maxLatencyMs, long minLatencyMs, double averageErrorRate, Instant lastCheckTime) Creates an instance of aHealthMetricsrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the value of theaverageErrorRaterecord component.doubleReturns the value of theaverageLatencyMsrecord component.intReturns the value of thedegradedCountrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of thehealthyCountrecord component.Returns the value of thelastCheckTimerecord component.longReturns the value of themaxLatencyMsrecord component.longReturns the value of theminLatencyMsrecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of thetotalConnectionsrecord component.intReturns the value of theunhealthyCountrecord component.
-
Constructor Details
-
HealthMetrics
public HealthMetrics(int totalConnections, int healthyCount, int degradedCount, int unhealthyCount, double averageLatencyMs, long maxLatencyMs, long minLatencyMs, double averageErrorRate, Instant lastCheckTime) Creates an instance of aHealthMetricsrecord class.- Parameters:
totalConnections- the value for thetotalConnectionsrecord componenthealthyCount- the value for thehealthyCountrecord componentdegradedCount- the value for thedegradedCountrecord componentunhealthyCount- the value for theunhealthyCountrecord componentaverageLatencyMs- the value for theaverageLatencyMsrecord componentmaxLatencyMs- the value for themaxLatencyMsrecord componentminLatencyMs- the value for theminLatencyMsrecord componentaverageErrorRate- the value for theaverageErrorRaterecord componentlastCheckTime- the value for thelastCheckTimerecord 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. -
totalConnections
public int totalConnections()Returns the value of thetotalConnectionsrecord component.- Returns:
- the value of the
totalConnectionsrecord component
-
healthyCount
public int healthyCount()Returns the value of thehealthyCountrecord component.- Returns:
- the value of the
healthyCountrecord component
-
degradedCount
public int degradedCount()Returns the value of thedegradedCountrecord component.- Returns:
- the value of the
degradedCountrecord component
-
unhealthyCount
public int unhealthyCount()Returns the value of theunhealthyCountrecord component.- Returns:
- the value of the
unhealthyCountrecord component
-
averageLatencyMs
public double averageLatencyMs()Returns the value of theaverageLatencyMsrecord component.- Returns:
- the value of the
averageLatencyMsrecord component
-
maxLatencyMs
public long maxLatencyMs()Returns the value of themaxLatencyMsrecord component.- Returns:
- the value of the
maxLatencyMsrecord component
-
minLatencyMs
public long minLatencyMs()Returns the value of theminLatencyMsrecord component.- Returns:
- the value of the
minLatencyMsrecord component
-
averageErrorRate
public double averageErrorRate()Returns the value of theaverageErrorRaterecord component.- Returns:
- the value of the
averageErrorRaterecord component
-
lastCheckTime
Returns the value of thelastCheckTimerecord component.- Returns:
- the value of the
lastCheckTimerecord component
-