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
ConstructorsConstructorDescriptionClientStatisticsPayload(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 aClientStatisticsPayloadrecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the value of theactiveConnectionsrecord component.intReturns the value of theavailableProcessorsrecord component.doubleReturns the value of theaverageConnectionWaitTimeMillisrecord component.longReturns the value of thecapturedAtEpochMillisrecord component.clientId()Returns the value of theclientIdrecord component.longReturns the value of theconnectionErrorsrecord component.intReturns the value of thedaemonThreadCountrecord component.static ClientStatisticsPayloaddeserialize(byte[] bytes) Deserialize a payload from wire bytes.final booleanIndicates whether some other object is "equal to" this one.longReturns the value of thegcCollectionCountrecord component.longReturns the value of thegcCollectionTimeMillisrecord component.final inthashCode()Returns a hash code value for this object.longReturns the value of theheapCommittedBytesrecord component.longReturns the value of theheapMaxBytesrecord component.longReturns the value of theheapUsedBytesrecord component.longReturns the value of theidleConnectionsrecord component.longReturns the value of thenearCacheEvictionsrecord component.doubleReturns the value of thenearCacheHitRatiorecord component.longReturns the value of thenearCacheHitsrecord component.longReturns the value of thenearCacheInvalidationsrecord component.longReturns the value of thenearCacheMissesrecord component.intReturns the value of thenearCacheSizerecord component.longReturns the value of thenonHeapUsedBytesrecord component.intReturns the value of theopenConnectionCountrecord component.intReturns the value of thependingRequestCountrecord component.longReturns the value of theprocessUptimeMillisrecord component.longsequence()Returns the value of thesequencerecord component.static byte[]serialize(ClientStatisticsPayload payload) Serialize a payload to wire bytes.doubleReturns the value of thesystemLoadAveragerecord component.intReturns the value of thethreadCountrecord component.final StringtoString()Returns a string representation of this record class.longReturns the value of thetotalConnectionsCreatedrecord component.longReturns the value of thetotalConnectionsDestroyedrecord component.longReturns the value of thetotalConnectionWaitCountrecord component.longReturns the value of thetotalConnectionWaitTimeMillisrecord component.
-
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 aClientStatisticsPayloadrecord class.- Parameters:
clientId- the value for theclientIdrecord componentsequence- the value for thesequencerecord componentcapturedAtEpochMillis- the value for thecapturedAtEpochMillisrecord componentprocessUptimeMillis- the value for theprocessUptimeMillisrecord componentheapUsedBytes- the value for theheapUsedBytesrecord componentheapCommittedBytes- the value for theheapCommittedBytesrecord componentheapMaxBytes- the value for theheapMaxBytesrecord componentnonHeapUsedBytes- the value for thenonHeapUsedBytesrecord componentthreadCount- the value for thethreadCountrecord componentdaemonThreadCount- the value for thedaemonThreadCountrecord componentgcCollectionCount- the value for thegcCollectionCountrecord componentgcCollectionTimeMillis- the value for thegcCollectionTimeMillisrecord componentavailableProcessors- the value for theavailableProcessorsrecord componentsystemLoadAverage- the value for thesystemLoadAveragerecord componentopenConnectionCount- the value for theopenConnectionCountrecord componentpendingRequestCount- the value for thependingRequestCountrecord componentactiveConnections- the value for theactiveConnectionsrecord componentidleConnections- the value for theidleConnectionsrecord componenttotalConnectionsCreated- the value for thetotalConnectionsCreatedrecord componenttotalConnectionsDestroyed- the value for thetotalConnectionsDestroyedrecord componentconnectionErrors- the value for theconnectionErrorsrecord componenttotalConnectionWaitCount- the value for thetotalConnectionWaitCountrecord componenttotalConnectionWaitTimeMillis- the value for thetotalConnectionWaitTimeMillisrecord componentaverageConnectionWaitTimeMillis- the value for theaverageConnectionWaitTimeMillisrecord componentnearCacheSize- the value for thenearCacheSizerecord componentnearCacheHits- the value for thenearCacheHitsrecord componentnearCacheMisses- the value for thenearCacheMissesrecord componentnearCacheEvictions- the value for thenearCacheEvictionsrecord componentnearCacheInvalidations- the value for thenearCacheInvalidationsrecord componentnearCacheHitRatio- the value for thenearCacheHitRatiorecord component
-
-
Method Details
-
serialize
Serialize a payload to wire bytes. -
deserialize
Deserialize a payload from wire bytes.- Throws:
IllegalArgumentException- when the bytes are truncated, from an unsupported version, or carry invalid fields
-
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. -
clientId
Returns the value of theclientIdrecord component.- Returns:
- the value of the
clientIdrecord component
-
sequence
public long sequence()Returns the value of thesequencerecord component.- Returns:
- the value of the
sequencerecord component
-
capturedAtEpochMillis
public long capturedAtEpochMillis()Returns the value of thecapturedAtEpochMillisrecord component.- Returns:
- the value of the
capturedAtEpochMillisrecord component
-
processUptimeMillis
public long processUptimeMillis()Returns the value of theprocessUptimeMillisrecord component.- Returns:
- the value of the
processUptimeMillisrecord component
-
heapUsedBytes
public long heapUsedBytes()Returns the value of theheapUsedBytesrecord component.- Returns:
- the value of the
heapUsedBytesrecord component
-
heapCommittedBytes
public long heapCommittedBytes()Returns the value of theheapCommittedBytesrecord component.- Returns:
- the value of the
heapCommittedBytesrecord component
-
heapMaxBytes
public long heapMaxBytes()Returns the value of theheapMaxBytesrecord component.- Returns:
- the value of the
heapMaxBytesrecord component
-
nonHeapUsedBytes
public long nonHeapUsedBytes()Returns the value of thenonHeapUsedBytesrecord component.- Returns:
- the value of the
nonHeapUsedBytesrecord component
-
threadCount
public int threadCount()Returns the value of thethreadCountrecord component.- Returns:
- the value of the
threadCountrecord component
-
daemonThreadCount
public int daemonThreadCount()Returns the value of thedaemonThreadCountrecord component.- Returns:
- the value of the
daemonThreadCountrecord component
-
gcCollectionCount
public long gcCollectionCount()Returns the value of thegcCollectionCountrecord component.- Returns:
- the value of the
gcCollectionCountrecord component
-
gcCollectionTimeMillis
public long gcCollectionTimeMillis()Returns the value of thegcCollectionTimeMillisrecord component.- Returns:
- the value of the
gcCollectionTimeMillisrecord component
-
availableProcessors
public int availableProcessors()Returns the value of theavailableProcessorsrecord component.- Returns:
- the value of the
availableProcessorsrecord component
-
systemLoadAverage
public double systemLoadAverage()Returns the value of thesystemLoadAveragerecord component.- Returns:
- the value of the
systemLoadAveragerecord component
-
openConnectionCount
public int openConnectionCount()Returns the value of theopenConnectionCountrecord component.- Returns:
- the value of the
openConnectionCountrecord component
-
pendingRequestCount
public int pendingRequestCount()Returns the value of thependingRequestCountrecord component.- Returns:
- the value of the
pendingRequestCountrecord component
-
activeConnections
public long activeConnections()Returns the value of theactiveConnectionsrecord component.- Returns:
- the value of the
activeConnectionsrecord component
-
idleConnections
public long idleConnections()Returns the value of theidleConnectionsrecord component.- Returns:
- the value of the
idleConnectionsrecord component
-
totalConnectionsCreated
public long totalConnectionsCreated()Returns the value of thetotalConnectionsCreatedrecord component.- Returns:
- the value of the
totalConnectionsCreatedrecord component
-
totalConnectionsDestroyed
public long totalConnectionsDestroyed()Returns the value of thetotalConnectionsDestroyedrecord component.- Returns:
- the value of the
totalConnectionsDestroyedrecord component
-
connectionErrors
public long connectionErrors()Returns the value of theconnectionErrorsrecord component.- Returns:
- the value of the
connectionErrorsrecord component
-
totalConnectionWaitCount
public long totalConnectionWaitCount()Returns the value of thetotalConnectionWaitCountrecord component.- Returns:
- the value of the
totalConnectionWaitCountrecord component
-
totalConnectionWaitTimeMillis
public long totalConnectionWaitTimeMillis()Returns the value of thetotalConnectionWaitTimeMillisrecord component.- Returns:
- the value of the
totalConnectionWaitTimeMillisrecord component
-
averageConnectionWaitTimeMillis
public double averageConnectionWaitTimeMillis()Returns the value of theaverageConnectionWaitTimeMillisrecord component.- Returns:
- the value of the
averageConnectionWaitTimeMillisrecord component
-
nearCacheSize
public int nearCacheSize()Returns the value of thenearCacheSizerecord component.- Returns:
- the value of the
nearCacheSizerecord component
-
nearCacheHits
public long nearCacheHits()Returns the value of thenearCacheHitsrecord component.- Returns:
- the value of the
nearCacheHitsrecord component
-
nearCacheMisses
public long nearCacheMisses()Returns the value of thenearCacheMissesrecord component.- Returns:
- the value of the
nearCacheMissesrecord component
-
nearCacheEvictions
public long nearCacheEvictions()Returns the value of thenearCacheEvictionsrecord component.- Returns:
- the value of the
nearCacheEvictionsrecord component
-
nearCacheInvalidations
public long nearCacheInvalidations()Returns the value of thenearCacheInvalidationsrecord component.- Returns:
- the value of the
nearCacheInvalidationsrecord component
-
nearCacheHitRatio
public double nearCacheHitRatio()Returns the value of thenearCacheHitRatiorecord component.- Returns:
- the value of the
nearCacheHitRatiorecord component
-