Record Class WatchManager.WatchStreamStats
java.lang.Object
java.lang.Record
com.loomcache.server.watch.WatchManager.WatchStreamStats
- Record Components:
totalEvents- total number of events processed across all streamsactiveStreams- number of currently active streamseventRate- estimated events per secondavgLatencyNs- average latency in nanoseconds for event delivery
- Enclosing class:
WatchManager
public static record WatchManager.WatchStreamStats(long totalEvents, int activeStreams, double eventRate, long avgLatencyNs)
extends Record
Statistics snapshot for event streaming.
- Since:
- 1.5
-
Constructor Summary
ConstructorsConstructorDescriptionWatchStreamStats(long totalEvents, int activeStreams, double eventRate, long avgLatencyNs) Creates an instance of aWatchStreamStatsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of theactiveStreamsrecord component.longReturns the value of theavgLatencyNsrecord component.final booleanIndicates whether some other object is "equal to" this one.doubleReturns the value of theeventRaterecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.longReturns the value of thetotalEventsrecord component.
-
Constructor Details
-
WatchStreamStats
public WatchStreamStats(long totalEvents, int activeStreams, double eventRate, long avgLatencyNs) Creates an instance of aWatchStreamStatsrecord class.- Parameters:
totalEvents- the value for thetotalEventsrecord componentactiveStreams- the value for theactiveStreamsrecord componenteventRate- the value for theeventRaterecord componentavgLatencyNs- the value for theavgLatencyNsrecord 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. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
totalEvents
public long totalEvents()Returns the value of thetotalEventsrecord component.- Returns:
- the value of the
totalEventsrecord component
-
activeStreams
public int activeStreams()Returns the value of theactiveStreamsrecord component.- Returns:
- the value of the
activeStreamsrecord component
-
eventRate
-
avgLatencyNs
public long avgLatencyNs()Returns the value of theavgLatencyNsrecord component.- Returns:
- the value of the
avgLatencyNsrecord component
-