Record Class SlotMetrics.SlotStats
java.lang.Object
java.lang.Record
com.loomcache.server.metrics.SlotMetrics.SlotStats
- Record Components:
keyCount- number of keys stored in this slotaccessCount- cumulative access count (reads + writes)bytesUsed- total bytes used by keys and values in this slot
- Enclosing class:
SlotMetrics
public static record SlotMetrics.SlotStats(long keyCount, long accessCount, long bytesUsed)
extends Record
Per-slot statistics.
This record holds a snapshot of metrics tracked within a single consistent hash slot.
- Since:
- 1.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the value of theaccessCountrecord component.longReturns the value of thebytesUsedrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longkeyCount()Returns the value of thekeyCountrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SlotStats
public SlotStats()Constructs a SlotStats with all counters initialized to zero. -
SlotStats
public SlotStats(long keyCount, long accessCount, long bytesUsed) Creates an instance of aSlotStatsrecord class.- Parameters:
keyCount- the value for thekeyCountrecord componentaccessCount- the value for theaccessCountrecord componentbytesUsed- the value for thebytesUsedrecord 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. -
keyCount
-
accessCount
public long accessCount()Returns the value of theaccessCountrecord component.- Returns:
- the value of the
accessCountrecord component
-
bytesUsed
-