Package io.camunda.zeebe.journal.record
Record Class PersistedJournalRecord
java.lang.Object
java.lang.Record
io.camunda.zeebe.journal.record.PersistedJournalRecord
- All Implemented Interfaces:
JournalRecord
public record PersistedJournalRecord(RecordMetadata metadata, RecordData record)
extends Record
implements JournalRecord
A JournalRecord stored in a buffer.
A PersistedJournalRecord consists of two parts. The first part is RecordMetadata. The second part is RecordData.
-
Constructor Summary
ConstructorsConstructorDescriptionPersistedJournalRecord(RecordMetadata metadata, RecordData record) Creates an instance of aPersistedJournalRecordrecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongasqn()Application sequence number for the recordlongchecksum()Checksum of the dataorg.agrona.DirectBufferdata()Application provided data of the recordfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longindex()Index of the recordmetadata()Returns the value of themetadatarecord component.record()Returns the value of therecordrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PersistedJournalRecord
Creates an instance of aPersistedJournalRecordrecord class.- Parameters:
metadata- the value for themetadatarecord componentrecord- the value for therecordrecord component
-
-
Method Details
-
index
public long index()Description copied from interface:JournalRecordIndex of the record- Specified by:
indexin interfaceJournalRecord- Returns:
- index
-
asqn
public long asqn()Description copied from interface:JournalRecordApplication sequence number for the record- Specified by:
asqnin interfaceJournalRecord- Returns:
- asqn
-
checksum
public long checksum()Description copied from interface:JournalRecordChecksum of the data- Specified by:
checksumin interfaceJournalRecord- Returns:
- checksum
-
data
public org.agrona.DirectBuffer data()Description copied from interface:JournalRecordApplication provided data of the record- Specified by:
datain interfaceJournalRecord- Returns:
- data
-
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 withObjects::equals(Object,Object). -
metadata
Returns the value of themetadatarecord component.- Returns:
- the value of the
metadatarecord component
-
record
Returns the value of therecordrecord component.- Returns:
- the value of the
recordrecord component
-