Record Class FileBasedSnapshotMetadata

java.lang.Object
java.lang.Record
io.camunda.zeebe.snapshots.impl.FileBasedSnapshotMetadata
All Implemented Interfaces:
SnapshotMetadata

public record FileBasedSnapshotMetadata(int version, long processedPosition, long exportedPosition, long lastFollowupEventPosition, boolean isBootstrap) extends Record implements SnapshotMetadata
  • Constructor Details

    • FileBasedSnapshotMetadata

      public FileBasedSnapshotMetadata(int version, long processedPosition, long exportedPosition, long lastFollowupEventPosition)
    • FileBasedSnapshotMetadata

      public FileBasedSnapshotMetadata(int version, long processedPosition, long exportedPosition, long lastFollowupEventPosition, boolean isBootstrap)
      Creates an instance of a FileBasedSnapshotMetadata record class.
      Parameters:
      version - the value for the version record component
      processedPosition - the value for the processedPosition record component
      exportedPosition - the value for the exportedPosition record component
      lastFollowupEventPosition - the value for the lastFollowupEventPosition record component
      isBootstrap - the value for the isBootstrap record component
  • Method Details

    • forBootstrap

      public static FileBasedSnapshotMetadata forBootstrap(int version)
    • encode

      public void encode(OutputStream output) throws IOException
      Throws:
      IOException
    • decode

      public static FileBasedSnapshotMetadata decode(byte[] serializedBytes) throws IOException
      Throws:
      IOException
    • 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 '=='.
      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.
    • version

      public int version()
      Returns the value of the version record component.
      Specified by:
      version in interface SnapshotMetadata
      Returns:
      the value of the version record component
    • processedPosition

      public long processedPosition()
      Returns the value of the processedPosition record component.
      Specified by:
      processedPosition in interface SnapshotMetadata
      Returns:
      the value of the processedPosition record component
    • exportedPosition

      public long exportedPosition()
      Returns the value of the exportedPosition record component.
      Specified by:
      exportedPosition in interface SnapshotMetadata
      Returns:
      the value of the exportedPosition record component
    • lastFollowupEventPosition

      public long lastFollowupEventPosition()
      Returns the value of the lastFollowupEventPosition record component.
      Specified by:
      lastFollowupEventPosition in interface SnapshotMetadata
      Returns:
      the value of the lastFollowupEventPosition record component
    • isBootstrap

      public boolean isBootstrap()
      Returns the value of the isBootstrap record component.
      Specified by:
      isBootstrap in interface SnapshotMetadata
      Returns:
      the value of the isBootstrap record component