Record Class StateMachineSnapshotManager.SnapshotMetadata
java.lang.Object
java.lang.Record
com.loomcache.server.persistence.StateMachineSnapshotManager.SnapshotMetadata
- Record Components:
snapshotIndex- the Raft log index this snapshot coverssnapshotTerm- the Raft term at this indexdataStructureCount- number of data structures snapshottedtotalSizeBytes- total uncompressed size in bytescompressedSizeBytes- compressed size in bytescreatedAt- timestamp when snapshot was createdchecksum- CRC32 checksum for integrity verification
- Enclosing class:
StateMachineSnapshotManager
public static record StateMachineSnapshotManager.SnapshotMetadata(long snapshotIndex, long snapshotTerm, int dataStructureCount, long totalSizeBytes, long compressedSizeBytes, long createdAt, long checksum)
extends Record
Metadata for a state machine snapshot.
-
Constructor Summary
ConstructorsConstructorDescriptionSnapshotMetadata(long snapshotIndex, long snapshotTerm, int dataStructureCount, long totalSizeBytes, long compressedSizeBytes, long createdAt, long checksum) Creates an instance of aSnapshotMetadatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongchecksum()Returns the value of thechecksumrecord component.longReturns the value of thecompressedSizeBytesrecord component.longReturns the value of thecreatedAtrecord component.intReturns the value of thedataStructureCountrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longReturns the value of thesnapshotIndexrecord component.longReturns the value of thesnapshotTermrecord component.final StringtoString()Returns a string representation of this record class.longReturns the value of thetotalSizeBytesrecord component.
-
Constructor Details
-
SnapshotMetadata
public SnapshotMetadata(long snapshotIndex, long snapshotTerm, int dataStructureCount, long totalSizeBytes, long compressedSizeBytes, long createdAt, long checksum) Creates an instance of aSnapshotMetadatarecord class.- Parameters:
snapshotIndex- the value for thesnapshotIndexrecord componentsnapshotTerm- the value for thesnapshotTermrecord componentdataStructureCount- the value for thedataStructureCountrecord componenttotalSizeBytes- the value for thetotalSizeBytesrecord componentcompressedSizeBytes- the value for thecompressedSizeBytesrecord componentcreatedAt- the value for thecreatedAtrecord componentchecksum- the value for thechecksumrecord 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. -
snapshotIndex
public long snapshotIndex()Returns the value of thesnapshotIndexrecord component.- Returns:
- the value of the
snapshotIndexrecord component
-
snapshotTerm
public long snapshotTerm()Returns the value of thesnapshotTermrecord component.- Returns:
- the value of the
snapshotTermrecord component
-
dataStructureCount
public int dataStructureCount()Returns the value of thedataStructureCountrecord component.- Returns:
- the value of the
dataStructureCountrecord component
-
totalSizeBytes
public long totalSizeBytes()Returns the value of thetotalSizeBytesrecord component.- Returns:
- the value of the
totalSizeBytesrecord component
-
compressedSizeBytes
public long compressedSizeBytes()Returns the value of thecompressedSizeBytesrecord component.- Returns:
- the value of the
compressedSizeBytesrecord component
-
createdAt
-
checksum
-