Record Class TtlManager.TtlStats
java.lang.Object
java.lang.Record
com.loomcache.server.lease.TtlManager.TtlStats
- Record Components:
totalManaged- total keys managed by TTLtotalExpired- total keys expired so faravgTtlMs- average remaining TTL in millisecondsshortestTtlMs- shortest remaining TTL in millisecondsactiveCount- number of actively tracked keyspendingCount- number of pending expiration tasks
- Enclosing class:
TtlManager
public static record TtlManager.TtlStats(long totalManaged, long totalExpired, long avgTtlMs, long shortestTtlMs, int activeCount, int pendingCount)
extends Record
Statistics about TTL management.
- Since:
- 1.5
-
Constructor Summary
ConstructorsConstructorDescriptionTtlStats(long totalManaged, long totalExpired, long avgTtlMs, long shortestTtlMs, int activeCount, int pendingCount) Creates an instance of aTtlStatsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of theactiveCountrecord component.longavgTtlMs()Returns the value of theavgTtlMsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of thependingCountrecord component.longReturns the value of theshortestTtlMsrecord component.final StringtoString()Returns a string representation of this record class.longReturns the value of thetotalExpiredrecord component.longReturns the value of thetotalManagedrecord component.
-
Constructor Details
-
TtlStats
public TtlStats(long totalManaged, long totalExpired, long avgTtlMs, long shortestTtlMs, int activeCount, int pendingCount) Creates an instance of aTtlStatsrecord class.- Parameters:
totalManaged- the value for thetotalManagedrecord componenttotalExpired- the value for thetotalExpiredrecord componentavgTtlMs- the value for theavgTtlMsrecord componentshortestTtlMs- the value for theshortestTtlMsrecord componentactiveCount- the value for theactiveCountrecord componentpendingCount- the value for thependingCountrecord 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. -
totalManaged
public long totalManaged()Returns the value of thetotalManagedrecord component.- Returns:
- the value of the
totalManagedrecord component
-
totalExpired
public long totalExpired()Returns the value of thetotalExpiredrecord component.- Returns:
- the value of the
totalExpiredrecord component
-
avgTtlMs
-
shortestTtlMs
public long shortestTtlMs()Returns the value of theshortestTtlMsrecord component.- Returns:
- the value of the
shortestTtlMsrecord component
-
activeCount
public int activeCount()Returns the value of theactiveCountrecord component.- Returns:
- the value of the
activeCountrecord component
-
pendingCount
public int pendingCount()Returns the value of thependingCountrecord component.- Returns:
- the value of the
pendingCountrecord component
-