Record Class TtlManager.TtlStats

java.lang.Object
java.lang.Record
com.loomcache.server.lease.TtlManager.TtlStats
Record Components:
totalManaged - total keys managed by TTL
totalExpired - total keys expired so far
avgTtlMs - average remaining TTL in milliseconds
shortestTtlMs - shortest remaining TTL in milliseconds
activeCount - number of actively tracked keys
pendingCount - 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 Details

    • TtlStats

      public TtlStats(long totalManaged, long totalExpired, long avgTtlMs, long shortestTtlMs, int activeCount, int pendingCount)
      Creates an instance of a TtlStats record class.
      Parameters:
      totalManaged - the value for the totalManaged record component
      totalExpired - the value for the totalExpired record component
      avgTtlMs - the value for the avgTtlMs record component
      shortestTtlMs - the value for the shortestTtlMs record component
      activeCount - the value for the activeCount record component
      pendingCount - the value for the pendingCount record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • totalManaged

      public long totalManaged()
      Returns the value of the totalManaged record component.
      Returns:
      the value of the totalManaged record component
    • totalExpired

      public long totalExpired()
      Returns the value of the totalExpired record component.
      Returns:
      the value of the totalExpired record component
    • avgTtlMs

      public long avgTtlMs()
      Returns the value of the avgTtlMs record component.
      Returns:
      the value of the avgTtlMs record component
    • shortestTtlMs

      public long shortestTtlMs()
      Returns the value of the shortestTtlMs record component.
      Returns:
      the value of the shortestTtlMs record component
    • activeCount

      public int activeCount()
      Returns the value of the activeCount record component.
      Returns:
      the value of the activeCount record component
    • pendingCount

      public int pendingCount()
      Returns the value of the pendingCount record component.
      Returns:
      the value of the pendingCount record component