Package io.zeebe.protocol.record
Interface Record<T extends RecordValue>
-
- All Superinterfaces:
Cloneable,JsonSerializable
public interface Record<T extends RecordValue> extends JsonSerializable, Cloneable
Represents a record published to the log stream.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Record<T>clone()Creates a deep copy of the current record.StringgetBrokerVersion()IntentgetIntent()longgetKey()Retrieves the key of the record.intgetPartitionId()longgetPosition()Retrieves the position of the record.RecordTypegetRecordType()StringgetRejectionReason()RejectionTypegetRejectionType()longgetSourceRecordPosition()Returns the position of the source record.longgetTimestamp()TgetValue()Returns the raw value of the record, which should implement one of the interfaces in theio.zeebe.exporter.record.valuepackage.ValueTypegetValueType()-
Methods inherited from interface io.zeebe.protocol.record.JsonSerializable
toJson
-
-
-
-
Method Detail
-
getPosition
long getPosition()
Retrieves the position of the record. Positions are locally unique to the partition, and monotonically increasing. Records are then ordered on the partition by their positions, i.e. lower position means the record was published earlier.- Returns:
- position the record
-
getSourceRecordPosition
long getSourceRecordPosition()
Returns the position of the source record. The source record denotes the record which caused the current record. It can be unset (meaning there is no source record), at which point the position returned here will be -1. Anything >= 0 implies a source record.- Returns:
- position of the source record
-
getKey
long getKey()
Retrieves the key of the record.Multiple records can have the same key if they belongs to the same logical entity. Keys are unique for the combination of partition and record type.
- Returns:
- the key of the record
-
getTimestamp
long getTimestamp()
- Returns:
- the unix timestamp at which the record was published on the partition.
-
getIntent
Intent getIntent()
- Returns:
- the intent of the record
-
getPartitionId
int getPartitionId()
- Returns:
- the partition ID on which the record was published
-
getRecordType
RecordType getRecordType()
- Returns:
- the type of the record (event, command or command rejection)
-
getRejectionType
RejectionType getRejectionType()
- Returns:
- the type of rejection if
getRecordType()returnsRecordType.COMMAND_REJECTIONor elsenull.
-
getRejectionReason
String getRejectionReason()
- Returns:
- the reason why a command was rejected if
getRecordType()returnsRecordType.COMMAND_REJECTIONor elsenull.
-
getBrokerVersion
String getBrokerVersion()
- Returns:
- the version of the broker that wrote this record
-
getValueType
ValueType getValueType()
- Returns:
- the type of the record (e.g. job, process, process instance, etc.)
-
getValue
T getValue()
Returns the raw value of the record, which should implement one of the interfaces in theio.zeebe.exporter.record.valuepackage.The record value is essentially the record specific data, e.g. for a process instance creation event, it would contain information relevant to the process instance being created.
- Returns:
- record value
-
-