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 covers
snapshotTerm - the Raft term at this index
dataStructureCount - number of data structures snapshotted
totalSizeBytes - total uncompressed size in bytes
compressedSizeBytes - compressed size in bytes
createdAt - timestamp when snapshot was created
checksum - 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 Details

    • SnapshotMetadata

      public SnapshotMetadata(long snapshotIndex, long snapshotTerm, int dataStructureCount, long totalSizeBytes, long compressedSizeBytes, long createdAt, long checksum)
      Creates an instance of a SnapshotMetadata record class.
      Parameters:
      snapshotIndex - the value for the snapshotIndex record component
      snapshotTerm - the value for the snapshotTerm record component
      dataStructureCount - the value for the dataStructureCount record component
      totalSizeBytes - the value for the totalSizeBytes record component
      compressedSizeBytes - the value for the compressedSizeBytes record component
      createdAt - the value for the createdAt record component
      checksum - the value for the checksum 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.
    • snapshotIndex

      public long snapshotIndex()
      Returns the value of the snapshotIndex record component.
      Returns:
      the value of the snapshotIndex record component
    • snapshotTerm

      public long snapshotTerm()
      Returns the value of the snapshotTerm record component.
      Returns:
      the value of the snapshotTerm record component
    • dataStructureCount

      public int dataStructureCount()
      Returns the value of the dataStructureCount record component.
      Returns:
      the value of the dataStructureCount record component
    • totalSizeBytes

      public long totalSizeBytes()
      Returns the value of the totalSizeBytes record component.
      Returns:
      the value of the totalSizeBytes record component
    • compressedSizeBytes

      public long compressedSizeBytes()
      Returns the value of the compressedSizeBytes record component.
      Returns:
      the value of the compressedSizeBytes record component
    • createdAt

      public long createdAt()
      Returns the value of the createdAt record component.
      Returns:
      the value of the createdAt record component
    • checksum

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