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) extends Record implements SnapshotMetadata
  • Constructor Summary

    Constructors
    Constructor
    Description
    FileBasedSnapshotMetadata(int version, long processedPosition, long exportedPosition, long lastFollowupEventPosition)
    Creates an instance of a FileBasedSnapshotMetadata record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    decode(byte[] serializedBytes)
     
    void
     
    final boolean
    Indicates whether some other object is "equal to" this one.
    long
    Returns the value of the exportedPosition record component.
    final int
    Returns a hash code value for this object.
    long
    Returns the value of the lastFollowupEventPosition record component.
    long
    Returns the value of the processedPosition record component.
    final String
    Returns a string representation of this record class.
    int
    Returns the value of the version record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • FileBasedSnapshotMetadata

      public FileBasedSnapshotMetadata(int version, long processedPosition, long exportedPosition, long lastFollowupEventPosition)
      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
  • Method Details

    • 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