Package io.camunda.zeebe.exporter
Record Class RecordSequence
java.lang.Object
java.lang.Record
io.camunda.zeebe.exporter.RecordSequence
- Record Components:
partitionId- the partition id of the recordcounter- the counter based on the record's value type
The record sequence is a combination of the partition id and the counter.
The Elasticsearch exporter puts the sequence together with the record in the index. It can be used to limit the number of records when reading from the index, for example, by using a range query.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionRecordSequence(int partitionId, long counter) Creates an instance of aRecordSequencerecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongcounter()Returns the value of thecounterrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of thepartitionIdrecord component.longsequence()The record sequence is calculated based on the following formula.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
RecordSequence
public RecordSequence(int partitionId, long counter) Creates an instance of aRecordSequencerecord class.- Parameters:
partitionId- the value for thepartitionIdrecord componentcounter- the value for thecounterrecord component
-
-
Method Details
-
sequence
public long sequence()The record sequence is calculated based on the following formula.((long) partitionId << 51) + counter
- Returns:
- the record sequence
-
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 '=='. -
partitionId
public int partitionId()Returns the value of thepartitionIdrecord component.- Returns:
- the value of the
partitionIdrecord component
-
counter
public long counter()Returns the value of thecounterrecord component.- Returns:
- the value of the
counterrecord component
-