Record Class SnapshotScheduler.SnapshotSchedulerStats
java.lang.Object
java.lang.Record
com.loomcache.server.persistence.SnapshotScheduler.SnapshotSchedulerStats
- Record Components:
snapshotsTaken- total number of snapshots createdlastSnapshotIndex- Raft index of the most recent snapshotlastSnapshotTime- milliseconds when the last snapshot was takentotalSnapshotTimeMs- cumulative time spent snapshottingfailedSnapshots- 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 Summary
ConstructorsConstructorDescriptionSnapshotSchedulerStats(long snapshotsTaken, long lastSnapshotIndex, long lastSnapshotTime, long totalSnapshotTimeMs, long failedSnapshots) Creates an instance of aSnapshotSchedulerStatsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.longReturns the value of thefailedSnapshotsrecord component.final inthashCode()Returns a hash code value for this object.longReturns the value of thelastSnapshotIndexrecord component.longReturns the value of thelastSnapshotTimerecord component.longReturns the value of thesnapshotsTakenrecord component.final StringtoString()Returns a string representation of this record class.longReturns the value of thetotalSnapshotTimeMsrecord component.
-
Constructor Details
-
SnapshotSchedulerStats
public SnapshotSchedulerStats(long snapshotsTaken, long lastSnapshotIndex, long lastSnapshotTime, long totalSnapshotTimeMs, long failedSnapshots) Creates an instance of aSnapshotSchedulerStatsrecord class.- Parameters:
snapshotsTaken- the value for thesnapshotsTakenrecord componentlastSnapshotIndex- the value for thelastSnapshotIndexrecord componentlastSnapshotTime- the value for thelastSnapshotTimerecord componenttotalSnapshotTimeMs- the value for thetotalSnapshotTimeMsrecord componentfailedSnapshots- the value for thefailedSnapshotsrecord 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. -
snapshotsTaken
public long snapshotsTaken()Returns the value of thesnapshotsTakenrecord component.- Returns:
- the value of the
snapshotsTakenrecord component
-
lastSnapshotIndex
public long lastSnapshotIndex()Returns the value of thelastSnapshotIndexrecord component.- Returns:
- the value of the
lastSnapshotIndexrecord component
-
lastSnapshotTime
public long lastSnapshotTime()Returns the value of thelastSnapshotTimerecord component.- Returns:
- the value of the
lastSnapshotTimerecord component
-
totalSnapshotTimeMs
public long totalSnapshotTimeMs()Returns the value of thetotalSnapshotTimeMsrecord component.- Returns:
- the value of the
totalSnapshotTimeMsrecord component
-
failedSnapshots
public long failedSnapshots()Returns the value of thefailedSnapshotsrecord component.- Returns:
- the value of the
failedSnapshotsrecord component
-