Record Class ClientStatisticsPayload

java.lang.Object
java.lang.Record
com.loomcache.common.protocol.ClientStatisticsPayload

public record ClientStatisticsPayload(String clientId, long sequence, long capturedAtEpochMillis, long processUptimeMillis, long heapUsedBytes, long heapCommittedBytes, long heapMaxBytes, long nonHeapUsedBytes, int threadCount, int daemonThreadCount, long gcCollectionCount, long gcCollectionTimeMillis, int availableProcessors, double systemLoadAverage, int openConnectionCount, int pendingRequestCount, long activeConnections, long idleConnections, long totalConnectionsCreated, long totalConnectionsDestroyed, long connectionErrors, long totalConnectionWaitCount, long totalConnectionWaitTimeMillis, double averageConnectionWaitTimeMillis, int nearCacheSize, long nearCacheHits, long nearCacheMisses, long nearCacheEvictions, long nearCacheInvalidations, double nearCacheHitRatio) extends Record
Wire payload for periodic client statistics uploads.

The payload is intentionally compact and self-describing enough for forward-compatible parsing: a magic, version, bounded client id string, then fixed-width JVM/process/connection/near-cache counters.

  • Constructor Summary

    Constructors
    Constructor
    Description
    ClientStatisticsPayload(String clientId, long sequence, long capturedAtEpochMillis, long processUptimeMillis, long heapUsedBytes, long heapCommittedBytes, long heapMaxBytes, long nonHeapUsedBytes, int threadCount, int daemonThreadCount, long gcCollectionCount, long gcCollectionTimeMillis, int availableProcessors, double systemLoadAverage, int openConnectionCount, int pendingRequestCount, long activeConnections, long idleConnections, long totalConnectionsCreated, long totalConnectionsDestroyed, long connectionErrors, long totalConnectionWaitCount, long totalConnectionWaitTimeMillis, double averageConnectionWaitTimeMillis, int nearCacheSize, long nearCacheHits, long nearCacheMisses, long nearCacheEvictions, long nearCacheInvalidations, double nearCacheHitRatio)
    Creates an instance of a ClientStatisticsPayload record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    Returns the value of the activeConnections record component.
    int
    Returns the value of the availableProcessors record component.
    double
    Returns the value of the averageConnectionWaitTimeMillis record component.
    long
    Returns the value of the capturedAtEpochMillis record component.
    Returns the value of the clientId record component.
    long
    Returns the value of the connectionErrors record component.
    int
    Returns the value of the daemonThreadCount record component.
    deserialize(byte[] bytes)
    Deserialize a payload from wire bytes.
    final boolean
    Indicates whether some other object is "equal to" this one.
    long
    Returns the value of the gcCollectionCount record component.
    long
    Returns the value of the gcCollectionTimeMillis record component.
    final int
    Returns a hash code value for this object.
    long
    Returns the value of the heapCommittedBytes record component.
    long
    Returns the value of the heapMaxBytes record component.
    long
    Returns the value of the heapUsedBytes record component.
    long
    Returns the value of the idleConnections record component.
    long
    Returns the value of the nearCacheEvictions record component.
    double
    Returns the value of the nearCacheHitRatio record component.
    long
    Returns the value of the nearCacheHits record component.
    long
    Returns the value of the nearCacheInvalidations record component.
    long
    Returns the value of the nearCacheMisses record component.
    int
    Returns the value of the nearCacheSize record component.
    long
    Returns the value of the nonHeapUsedBytes record component.
    int
    Returns the value of the openConnectionCount record component.
    int
    Returns the value of the pendingRequestCount record component.
    long
    Returns the value of the processUptimeMillis record component.
    long
    Returns the value of the sequence record component.
    static byte[]
    Serialize a payload to wire bytes.
    double
    Returns the value of the systemLoadAverage record component.
    int
    Returns the value of the threadCount record component.
    final String
    Returns a string representation of this record class.
    long
    Returns the value of the totalConnectionsCreated record component.
    long
    Returns the value of the totalConnectionsDestroyed record component.
    long
    Returns the value of the totalConnectionWaitCount record component.
    long
    Returns the value of the totalConnectionWaitTimeMillis record component.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • ClientStatisticsPayload

      public ClientStatisticsPayload(String clientId, long sequence, long capturedAtEpochMillis, long processUptimeMillis, long heapUsedBytes, long heapCommittedBytes, long heapMaxBytes, long nonHeapUsedBytes, int threadCount, int daemonThreadCount, long gcCollectionCount, long gcCollectionTimeMillis, int availableProcessors, double systemLoadAverage, int openConnectionCount, int pendingRequestCount, long activeConnections, long idleConnections, long totalConnectionsCreated, long totalConnectionsDestroyed, long connectionErrors, long totalConnectionWaitCount, long totalConnectionWaitTimeMillis, double averageConnectionWaitTimeMillis, int nearCacheSize, long nearCacheHits, long nearCacheMisses, long nearCacheEvictions, long nearCacheInvalidations, double nearCacheHitRatio)
      Creates an instance of a ClientStatisticsPayload record class.
      Parameters:
      clientId - the value for the clientId record component
      sequence - the value for the sequence record component
      capturedAtEpochMillis - the value for the capturedAtEpochMillis record component
      processUptimeMillis - the value for the processUptimeMillis record component
      heapUsedBytes - the value for the heapUsedBytes record component
      heapCommittedBytes - the value for the heapCommittedBytes record component
      heapMaxBytes - the value for the heapMaxBytes record component
      nonHeapUsedBytes - the value for the nonHeapUsedBytes record component
      threadCount - the value for the threadCount record component
      daemonThreadCount - the value for the daemonThreadCount record component
      gcCollectionCount - the value for the gcCollectionCount record component
      gcCollectionTimeMillis - the value for the gcCollectionTimeMillis record component
      availableProcessors - the value for the availableProcessors record component
      systemLoadAverage - the value for the systemLoadAverage record component
      openConnectionCount - the value for the openConnectionCount record component
      pendingRequestCount - the value for the pendingRequestCount record component
      activeConnections - the value for the activeConnections record component
      idleConnections - the value for the idleConnections record component
      totalConnectionsCreated - the value for the totalConnectionsCreated record component
      totalConnectionsDestroyed - the value for the totalConnectionsDestroyed record component
      connectionErrors - the value for the connectionErrors record component
      totalConnectionWaitCount - the value for the totalConnectionWaitCount record component
      totalConnectionWaitTimeMillis - the value for the totalConnectionWaitTimeMillis record component
      averageConnectionWaitTimeMillis - the value for the averageConnectionWaitTimeMillis record component
      nearCacheSize - the value for the nearCacheSize record component
      nearCacheHits - the value for the nearCacheHits record component
      nearCacheMisses - the value for the nearCacheMisses record component
      nearCacheEvictions - the value for the nearCacheEvictions record component
      nearCacheInvalidations - the value for the nearCacheInvalidations record component
      nearCacheHitRatio - the value for the nearCacheHitRatio record component
  • Method Details

    • serialize

      public static byte[] serialize(ClientStatisticsPayload payload)
      Serialize a payload to wire bytes.
    • deserialize

      public static ClientStatisticsPayload deserialize(byte[] bytes)
      Deserialize a payload from wire bytes.
      Throws:
      IllegalArgumentException - when the bytes are truncated, from an unsupported version, or carry invalid fields
    • 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.
    • clientId

      public String clientId()
      Returns the value of the clientId record component.
      Returns:
      the value of the clientId record component
    • sequence

      public long sequence()
      Returns the value of the sequence record component.
      Returns:
      the value of the sequence record component
    • capturedAtEpochMillis

      public long capturedAtEpochMillis()
      Returns the value of the capturedAtEpochMillis record component.
      Returns:
      the value of the capturedAtEpochMillis record component
    • processUptimeMillis

      public long processUptimeMillis()
      Returns the value of the processUptimeMillis record component.
      Returns:
      the value of the processUptimeMillis record component
    • heapUsedBytes

      public long heapUsedBytes()
      Returns the value of the heapUsedBytes record component.
      Returns:
      the value of the heapUsedBytes record component
    • heapCommittedBytes

      public long heapCommittedBytes()
      Returns the value of the heapCommittedBytes record component.
      Returns:
      the value of the heapCommittedBytes record component
    • heapMaxBytes

      public long heapMaxBytes()
      Returns the value of the heapMaxBytes record component.
      Returns:
      the value of the heapMaxBytes record component
    • nonHeapUsedBytes

      public long nonHeapUsedBytes()
      Returns the value of the nonHeapUsedBytes record component.
      Returns:
      the value of the nonHeapUsedBytes record component
    • threadCount

      public int threadCount()
      Returns the value of the threadCount record component.
      Returns:
      the value of the threadCount record component
    • daemonThreadCount

      public int daemonThreadCount()
      Returns the value of the daemonThreadCount record component.
      Returns:
      the value of the daemonThreadCount record component
    • gcCollectionCount

      public long gcCollectionCount()
      Returns the value of the gcCollectionCount record component.
      Returns:
      the value of the gcCollectionCount record component
    • gcCollectionTimeMillis

      public long gcCollectionTimeMillis()
      Returns the value of the gcCollectionTimeMillis record component.
      Returns:
      the value of the gcCollectionTimeMillis record component
    • availableProcessors

      public int availableProcessors()
      Returns the value of the availableProcessors record component.
      Returns:
      the value of the availableProcessors record component
    • systemLoadAverage

      public double systemLoadAverage()
      Returns the value of the systemLoadAverage record component.
      Returns:
      the value of the systemLoadAverage record component
    • openConnectionCount

      public int openConnectionCount()
      Returns the value of the openConnectionCount record component.
      Returns:
      the value of the openConnectionCount record component
    • pendingRequestCount

      public int pendingRequestCount()
      Returns the value of the pendingRequestCount record component.
      Returns:
      the value of the pendingRequestCount record component
    • activeConnections

      public long activeConnections()
      Returns the value of the activeConnections record component.
      Returns:
      the value of the activeConnections record component
    • idleConnections

      public long idleConnections()
      Returns the value of the idleConnections record component.
      Returns:
      the value of the idleConnections record component
    • totalConnectionsCreated

      public long totalConnectionsCreated()
      Returns the value of the totalConnectionsCreated record component.
      Returns:
      the value of the totalConnectionsCreated record component
    • totalConnectionsDestroyed

      public long totalConnectionsDestroyed()
      Returns the value of the totalConnectionsDestroyed record component.
      Returns:
      the value of the totalConnectionsDestroyed record component
    • connectionErrors

      public long connectionErrors()
      Returns the value of the connectionErrors record component.
      Returns:
      the value of the connectionErrors record component
    • totalConnectionWaitCount

      public long totalConnectionWaitCount()
      Returns the value of the totalConnectionWaitCount record component.
      Returns:
      the value of the totalConnectionWaitCount record component
    • totalConnectionWaitTimeMillis

      public long totalConnectionWaitTimeMillis()
      Returns the value of the totalConnectionWaitTimeMillis record component.
      Returns:
      the value of the totalConnectionWaitTimeMillis record component
    • averageConnectionWaitTimeMillis

      public double averageConnectionWaitTimeMillis()
      Returns the value of the averageConnectionWaitTimeMillis record component.
      Returns:
      the value of the averageConnectionWaitTimeMillis record component
    • nearCacheSize

      public int nearCacheSize()
      Returns the value of the nearCacheSize record component.
      Returns:
      the value of the nearCacheSize record component
    • nearCacheHits

      public long nearCacheHits()
      Returns the value of the nearCacheHits record component.
      Returns:
      the value of the nearCacheHits record component
    • nearCacheMisses

      public long nearCacheMisses()
      Returns the value of the nearCacheMisses record component.
      Returns:
      the value of the nearCacheMisses record component
    • nearCacheEvictions

      public long nearCacheEvictions()
      Returns the value of the nearCacheEvictions record component.
      Returns:
      the value of the nearCacheEvictions record component
    • nearCacheInvalidations

      public long nearCacheInvalidations()
      Returns the value of the nearCacheInvalidations record component.
      Returns:
      the value of the nearCacheInvalidations record component
    • nearCacheHitRatio

      public double nearCacheHitRatio()
      Returns the value of the nearCacheHitRatio record component.
      Returns:
      the value of the nearCacheHitRatio record component