Record Class RecordBatchEntry
java.lang.Object
java.lang.Record
io.camunda.zeebe.engine.api.records.RecordBatchEntry
- All Implemented Interfaces:
ImmutableRecordBatchEntry
public record RecordBatchEntry(long key, int sourceIndex, RecordMetadata recordMetadata, UnifiedRecordValue unifiedRecordValue)
extends Record
implements ImmutableRecordBatchEntry
-
Constructor Summary
ConstructorsConstructorDescriptionRecordBatchEntry(long key, int sourceIndex, RecordMetadata recordMetadata, UnifiedRecordValue unifiedRecordValue) Creates an instance of aRecordBatchEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic RecordBatchEntrycreateEntry(long key, int sourceIndex, RecordType recordType, Intent intent, RejectionType rejectionType, String rejectionReason, ValueType valueType, BufferWriter valueWriter) final booleanIndicates whether some other object is "equal to" this one.intintintfinal inthashCode()Returns a hash code value for this object.longkey()Returns the value of thekeyrecord component.Returns the value of therecordMetadatarecord component.intReturns the value of thesourceIndexrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theunifiedRecordValuerecord component.
-
Constructor Details
-
RecordBatchEntry
public RecordBatchEntry(long key, int sourceIndex, RecordMetadata recordMetadata, UnifiedRecordValue unifiedRecordValue) Creates an instance of aRecordBatchEntryrecord class.- Parameters:
key- the value for thekeyrecord componentsourceIndex- the value for thesourceIndexrecord componentrecordMetadata- the value for therecordMetadatarecord componentunifiedRecordValue- the value for theunifiedRecordValuerecord component
-
-
Method Details
-
recordValue
- Specified by:
recordValuein interfaceImmutableRecordBatchEntry- Returns:
- the actual record value, this method returns a general type but can be casted to the right record value class if necessary
-
getLength
public int getLength()- Specified by:
getLengthin interfaceImmutableRecordBatchEntry- Returns:
- the length of the record entry, important for the batch to determine whether it reached its maximum size
-
getMetadataLength
public int getMetadataLength() -
getValueLength
public int getValueLength() -
createEntry
public static RecordBatchEntry createEntry(long key, int sourceIndex, RecordType recordType, Intent intent, RejectionType rejectionType, String rejectionReason, ValueType valueType, BufferWriter valueWriter) -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
key
public long key()Returns the value of thekeyrecord component.- Specified by:
keyin interfaceImmutableRecordBatchEntry- Returns:
- the value of the
keyrecord component
-
sourceIndex
public int sourceIndex()Returns the value of thesourceIndexrecord component.- Specified by:
sourceIndexin interfaceImmutableRecordBatchEntry- Returns:
- the value of the
sourceIndexrecord component
-
recordMetadata
Returns the value of therecordMetadatarecord component.- Specified by:
recordMetadatain interfaceImmutableRecordBatchEntry- Returns:
- the value of the
recordMetadatarecord component
-
unifiedRecordValue
Returns the value of theunifiedRecordValuerecord component.- Returns:
- the value of the
unifiedRecordValuerecord component
-