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

    Constructors
    Constructor
    Description
    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 a CacheStatsSnapshot record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    Returns the value of the activeL1Count record component.
    long
    Returns the value of the activeL2Count record component.
    long
    Returns the value of the activeL3Count record component.
    long
    Returns the value of the demotionsL1ToL2 record component.
    long
    Returns the value of the demotionsL2ToL3 record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    long
    Returns the value of the evictions record component.
    final int
    Returns a hash code value for this object.
    double
     
    long
    Returns the value of the hitsL1 record component.
    long
    Returns the value of the hitsL2 record component.
    long
    Returns the value of the hitsL3 record component.
    long
    Returns the value of the misses record component.
    long
    Returns the value of the promotionsL2ToL1 record component.
    long
    Returns the value of the promotionsL3ToL2 record component.
    final String
    Returns a string representation of this record class.
    long
     
    long
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • 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 a CacheStatsSnapshot record class.
      Parameters:
      hitsL1 - the value for the hitsL1 record component
      hitsL2 - the value for the hitsL2 record component
      hitsL3 - the value for the hitsL3 record component
      misses - the value for the misses record component
      promotionsL3ToL2 - the value for the promotionsL3ToL2 record component
      promotionsL2ToL1 - the value for the promotionsL2ToL1 record component
      demotionsL1ToL2 - the value for the demotionsL1ToL2 record component
      demotionsL2ToL3 - the value for the demotionsL2ToL3 record component
      evictions - the value for the evictions record component
      activeL1Count - the value for the activeL1Count record component
      activeL2Count - the value for the activeL2Count record component
      activeL3Count - the value for the activeL3Count record component
  • Method Details

    • totalHits

      public long totalHits()
    • totalRequests

      public long totalRequests()
    • hitRate

      public double hitRate()
    • 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 '=='.
      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.
    • hitsL1

      public long hitsL1()
      Returns the value of the hitsL1 record component.
      Returns:
      the value of the hitsL1 record component
    • hitsL2

      public long hitsL2()
      Returns the value of the hitsL2 record component.
      Returns:
      the value of the hitsL2 record component
    • hitsL3

      public long hitsL3()
      Returns the value of the hitsL3 record component.
      Returns:
      the value of the hitsL3 record component
    • misses

      public long misses()
      Returns the value of the misses record component.
      Returns:
      the value of the misses record component
    • promotionsL3ToL2

      public long promotionsL3ToL2()
      Returns the value of the promotionsL3ToL2 record component.
      Returns:
      the value of the promotionsL3ToL2 record component
    • promotionsL2ToL1

      public long promotionsL2ToL1()
      Returns the value of the promotionsL2ToL1 record component.
      Returns:
      the value of the promotionsL2ToL1 record component
    • demotionsL1ToL2

      public long demotionsL1ToL2()
      Returns the value of the demotionsL1ToL2 record component.
      Returns:
      the value of the demotionsL1ToL2 record component
    • demotionsL2ToL3

      public long demotionsL2ToL3()
      Returns the value of the demotionsL2ToL3 record component.
      Returns:
      the value of the demotionsL2ToL3 record component
    • evictions

      public long evictions()
      Returns the value of the evictions record component.
      Returns:
      the value of the evictions record component
    • activeL1Count

      public long activeL1Count()
      Returns the value of the activeL1Count record component.
      Returns:
      the value of the activeL1Count record component
    • activeL2Count

      public long activeL2Count()
      Returns the value of the activeL2Count record component.
      Returns:
      the value of the activeL2Count record component
    • activeL3Count

      public long activeL3Count()
      Returns the value of the activeL3Count record component.
      Returns:
      the value of the activeL3Count record component