Record Class ConnectionHealthMonitor.HealthMetrics

java.lang.Object
java.lang.Record
com.loomcache.server.network.ConnectionHealthMonitor.HealthMetrics
Record Components:
totalConnections - total number of connections being monitored
healthyCount - number of healthy connections
degradedCount - number of degraded connections
unhealthyCount - number of unhealthy connections
averageLatencyMs - average latency across all connections
maxLatencyMs - maximum latency observed
minLatencyMs - minimum latency observed
averageErrorRate - average error rate across all connections
lastCheckTime - 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 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 a HealthMetrics record class.
      Parameters:
      totalConnections - the value for the totalConnections record component
      healthyCount - the value for the healthyCount record component
      degradedCount - the value for the degradedCount record component
      unhealthyCount - the value for the unhealthyCount record component
      averageLatencyMs - the value for the averageLatencyMs record component
      maxLatencyMs - the value for the maxLatencyMs record component
      minLatencyMs - the value for the minLatencyMs record component
      averageErrorRate - the value for the averageErrorRate record component
      lastCheckTime - the value for the lastCheckTime record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • totalConnections

      public int totalConnections()
      Returns the value of the totalConnections record component.
      Returns:
      the value of the totalConnections record component
    • healthyCount

      public int healthyCount()
      Returns the value of the healthyCount record component.
      Returns:
      the value of the healthyCount record component
    • degradedCount

      public int degradedCount()
      Returns the value of the degradedCount record component.
      Returns:
      the value of the degradedCount record component
    • unhealthyCount

      public int unhealthyCount()
      Returns the value of the unhealthyCount record component.
      Returns:
      the value of the unhealthyCount record component
    • averageLatencyMs

      public double averageLatencyMs()
      Returns the value of the averageLatencyMs record component.
      Returns:
      the value of the averageLatencyMs record component
    • maxLatencyMs

      public long maxLatencyMs()
      Returns the value of the maxLatencyMs record component.
      Returns:
      the value of the maxLatencyMs record component
    • minLatencyMs

      public long minLatencyMs()
      Returns the value of the minLatencyMs record component.
      Returns:
      the value of the minLatencyMs record component
    • averageErrorRate

      public double averageErrorRate()
      Returns the value of the averageErrorRate record component.
      Returns:
      the value of the averageErrorRate record component
    • lastCheckTime

      public Instant lastCheckTime()
      Returns the value of the lastCheckTime record component.
      Returns:
      the value of the lastCheckTime record component