Record Class SnapshotScheduler.SnapshotSchedulerStats

java.lang.Object
java.lang.Record
com.loomcache.server.persistence.SnapshotScheduler.SnapshotSchedulerStats
Record Components:
snapshotsTaken - total number of snapshots created
lastSnapshotIndex - Raft index of the most recent snapshot
lastSnapshotTime - milliseconds when the last snapshot was taken
totalSnapshotTimeMs - cumulative time spent snapshotting
failedSnapshots - number of snapshots that failed
Enclosing class:
SnapshotScheduler

public static record SnapshotScheduler.SnapshotSchedulerStats(long snapshotsTaken, long lastSnapshotIndex, long lastSnapshotTime, long totalSnapshotTimeMs, long failedSnapshots) extends Record
Statistics about snapshot scheduler activity.
  • Constructor Details

    • SnapshotSchedulerStats

      public SnapshotSchedulerStats(long snapshotsTaken, long lastSnapshotIndex, long lastSnapshotTime, long totalSnapshotTimeMs, long failedSnapshots)
      Creates an instance of a SnapshotSchedulerStats record class.
      Parameters:
      snapshotsTaken - the value for the snapshotsTaken record component
      lastSnapshotIndex - the value for the lastSnapshotIndex record component
      lastSnapshotTime - the value for the lastSnapshotTime record component
      totalSnapshotTimeMs - the value for the totalSnapshotTimeMs record component
      failedSnapshots - the value for the failedSnapshots 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.
    • snapshotsTaken

      public long snapshotsTaken()
      Returns the value of the snapshotsTaken record component.
      Returns:
      the value of the snapshotsTaken record component
    • lastSnapshotIndex

      public long lastSnapshotIndex()
      Returns the value of the lastSnapshotIndex record component.
      Returns:
      the value of the lastSnapshotIndex record component
    • lastSnapshotTime

      public long lastSnapshotTime()
      Returns the value of the lastSnapshotTime record component.
      Returns:
      the value of the lastSnapshotTime record component
    • totalSnapshotTimeMs

      public long totalSnapshotTimeMs()
      Returns the value of the totalSnapshotTimeMs record component.
      Returns:
      the value of the totalSnapshotTimeMs record component
    • failedSnapshots

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