Package io.camunda.zeebe.snapshots.impl
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
ConstructorsConstructorDescriptionFileBasedSnapshotMetadata(int version, long processedPosition, long exportedPosition, long lastFollowupEventPosition) Creates an instance of aFileBasedSnapshotMetadatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic FileBasedSnapshotMetadatadecode(byte[] serializedBytes) voidencode(OutputStream output) final booleanIndicates whether some other object is "equal to" this one.longReturns the value of theexportedPositionrecord component.final inthashCode()Returns a hash code value for this object.longReturns the value of thelastFollowupEventPositionrecord component.longReturns the value of theprocessedPositionrecord component.final StringtoString()Returns a string representation of this record class.intversion()Returns the value of theversionrecord component.
-
Constructor Details
-
FileBasedSnapshotMetadata
public FileBasedSnapshotMetadata(int version, long processedPosition, long exportedPosition, long lastFollowupEventPosition) Creates an instance of aFileBasedSnapshotMetadatarecord class.- Parameters:
version- the value for theversionrecord componentprocessedPosition- the value for theprocessedPositionrecord componentexportedPosition- the value for theexportedPositionrecord componentlastFollowupEventPosition- the value for thelastFollowupEventPositionrecord component
-
-
Method Details
-
encode
- Throws:
IOException
-
decode
- Throws:
IOException
-
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 '=='. -
version
public int version()Returns the value of theversionrecord component.- Specified by:
versionin interfaceSnapshotMetadata- Returns:
- the value of the
versionrecord component
-
processedPosition
public long processedPosition()Returns the value of theprocessedPositionrecord component.- Specified by:
processedPositionin interfaceSnapshotMetadata- Returns:
- the value of the
processedPositionrecord component
-
exportedPosition
public long exportedPosition()Returns the value of theexportedPositionrecord component.- Specified by:
exportedPositionin interfaceSnapshotMetadata- Returns:
- the value of the
exportedPositionrecord component
-
lastFollowupEventPosition
public long lastFollowupEventPosition()Returns the value of thelastFollowupEventPositionrecord component.- Specified by:
lastFollowupEventPositionin interfaceSnapshotMetadata- Returns:
- the value of the
lastFollowupEventPositionrecord component
-