Package dev.agenor.runtime.persistence
Record Class FilePersistenceService.PersistenceStats
java.lang.Object
java.lang.Record
dev.agenor.runtime.persistence.FilePersistenceService.PersistenceStats
- Enclosing class:
FilePersistenceService
public static record FilePersistenceService.PersistenceStats(long totalStates, long totalSnapshots, long totalSizeBytes)
extends Record
Statistics about persisted data
-
Constructor Summary
ConstructorsConstructorDescriptionPersistenceStats(long totalStates, long totalSnapshots, long totalSizeBytes) Creates an instance of aPersistenceStatsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.toString()Returns a string representation of this record class.longReturns the value of thetotalSizeBytesrecord component.longReturns the value of thetotalSnapshotsrecord component.longReturns the value of thetotalStatesrecord component.
-
Constructor Details
-
PersistenceStats
public PersistenceStats(long totalStates, long totalSnapshots, long totalSizeBytes) Creates an instance of aPersistenceStatsrecord class.- Parameters:
totalStates- the value for thetotalStatesrecord componenttotalSnapshots- the value for thetotalSnapshotsrecord componenttotalSizeBytes- the value for thetotalSizeBytesrecord component
-
-
Method Details
-
formatTotalSize
-
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. -
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. -
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 '=='. -
totalStates
public long totalStates()Returns the value of thetotalStatesrecord component.- Returns:
- the value of the
totalStatesrecord component
-
totalSnapshots
public long totalSnapshots()Returns the value of thetotalSnapshotsrecord component.- Returns:
- the value of the
totalSnapshotsrecord component
-
totalSizeBytes
public long totalSizeBytes()Returns the value of thetotalSizeBytesrecord component.- Returns:
- the value of the
totalSizeBytesrecord component
-