Package com.helix.core.cache
Record Class CacheStatsSnapshot
java.lang.Object
java.lang.Record
com.helix.core.cache.CacheStatsSnapshot
public record CacheStatsSnapshot(long hitsL1, long hitsL2, long hitsL3, long misses, long promotionsL3ToL2, long promotionsL2ToL1, long demotionsL1ToL2, long demotionsL2ToL3, long evictions, long activeL1Count, long activeL2Count, long activeL3Count)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionCacheStatsSnapshot(long hitsL1, long hitsL2, long hitsL3, long misses, long promotionsL3ToL2, long promotionsL2ToL1, long demotionsL1ToL2, long demotionsL2ToL3, long evictions, long activeL1Count, long activeL2Count, long activeL3Count) Creates an instance of aCacheStatsSnapshotrecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the value of theactiveL1Countrecord component.longReturns the value of theactiveL2Countrecord component.longReturns the value of theactiveL3Countrecord component.longReturns the value of thedemotionsL1ToL2record component.longReturns the value of thedemotionsL2ToL3record component.final booleanIndicates whether some other object is "equal to" this one.longReturns the value of theevictionsrecord component.final inthashCode()Returns a hash code value for this object.doublehitRate()longhitsL1()Returns the value of thehitsL1record component.longhitsL2()Returns the value of thehitsL2record component.longhitsL3()Returns the value of thehitsL3record component.longmisses()Returns the value of themissesrecord component.longReturns the value of thepromotionsL2ToL1record component.longReturns the value of thepromotionsL3ToL2record component.final StringtoString()Returns a string representation of this record class.longlong
-
Constructor Details
-
CacheStatsSnapshot
public CacheStatsSnapshot(long hitsL1, long hitsL2, long hitsL3, long misses, long promotionsL3ToL2, long promotionsL2ToL1, long demotionsL1ToL2, long demotionsL2ToL3, long evictions, long activeL1Count, long activeL2Count, long activeL3Count) Creates an instance of aCacheStatsSnapshotrecord class.- Parameters:
hitsL1- the value for thehitsL1record componenthitsL2- the value for thehitsL2record componenthitsL3- the value for thehitsL3record componentmisses- the value for themissesrecord componentpromotionsL3ToL2- the value for thepromotionsL3ToL2record componentpromotionsL2ToL1- the value for thepromotionsL2ToL1record componentdemotionsL1ToL2- the value for thedemotionsL1ToL2record componentdemotionsL2ToL3- the value for thedemotionsL2ToL3record componentevictions- the value for theevictionsrecord componentactiveL1Count- the value for theactiveL1Countrecord componentactiveL2Count- the value for theactiveL2Countrecord componentactiveL3Count- the value for theactiveL3Countrecord component
-
-
Method Details
-
totalHits
public long totalHits() -
totalRequests
public long totalRequests() -
hitRate
public double hitRate() -
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. -
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. -
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 '=='. -
hitsL1
public long hitsL1()Returns the value of thehitsL1record component.- Returns:
- the value of the
hitsL1record component
-
hitsL2
public long hitsL2()Returns the value of thehitsL2record component.- Returns:
- the value of the
hitsL2record component
-
hitsL3
public long hitsL3()Returns the value of thehitsL3record component.- Returns:
- the value of the
hitsL3record component
-
misses
public long misses()Returns the value of themissesrecord component.- Returns:
- the value of the
missesrecord component
-
promotionsL3ToL2
public long promotionsL3ToL2()Returns the value of thepromotionsL3ToL2record component.- Returns:
- the value of the
promotionsL3ToL2record component
-
promotionsL2ToL1
public long promotionsL2ToL1()Returns the value of thepromotionsL2ToL1record component.- Returns:
- the value of the
promotionsL2ToL1record component
-
demotionsL1ToL2
public long demotionsL1ToL2()Returns the value of thedemotionsL1ToL2record component.- Returns:
- the value of the
demotionsL1ToL2record component
-
demotionsL2ToL3
public long demotionsL2ToL3()Returns the value of thedemotionsL2ToL3record component.- Returns:
- the value of the
demotionsL2ToL3record component
-
evictions
public long evictions()Returns the value of theevictionsrecord component.- Returns:
- the value of the
evictionsrecord component
-
activeL1Count
public long activeL1Count()Returns the value of theactiveL1Countrecord component.- Returns:
- the value of the
activeL1Countrecord component
-
activeL2Count
public long activeL2Count()Returns the value of theactiveL2Countrecord component.- Returns:
- the value of the
activeL2Countrecord component
-
activeL3Count
public long activeL3Count()Returns the value of theactiveL3Countrecord component.- Returns:
- the value of the
activeL3Countrecord component
-