Package io.camunda.zeebe.logstreams.log
Interface LoggedEvent
- All Superinterfaces:
BufferWriter
- All Known Implementing Classes:
LoggedEventImpl
Represents an event on the log stream.
-
Method Summary
Modifier and TypeMethodDescriptionlonggetKey()org.agrona.DirectBufferintintlonglonglongorg.agrona.DirectBufferintintshortReturns the version of the log entry descriptor used for serialization.voidreadMetadata(BufferReader reader) Wraps the given buffer to read the event's metadatavoidreadValue(BufferReader reader) Wraps the given buffer to read the event's value.booleanMethods inherited from interface io.camunda.zeebe.util.buffer.BufferWriter
getLength, write
-
Method Details
-
shouldSkipProcessing
boolean shouldSkipProcessing()- Returns:
- returns true if record has already been processed, and should be skipped
-
getPosition
long getPosition()- Returns:
- the event's position in the log.
-
getSourceEventPosition
long getSourceEventPosition()- Returns:
- the position of the event which causes this event. Returns a negative value if no such an event exists.
-
getKey
long getKey()- Returns:
- the key of the event
-
getTimestamp
long getTimestamp()- Returns:
- the timestamp of the event, the ActorClock current time when the event was written
-
getMetadata
org.agrona.DirectBuffer getMetadata()- Returns:
- a buffer containing the event's metadata at offset
getMetadataOffset()and with lengthgetMetadataLength().
-
getMetadataOffset
int getMetadataOffset()- Returns:
- the offset of the event's metadata
-
getMetadataLength
int getMetadataLength()- Returns:
- the length of the event's metadata
-
readMetadata
Wraps the given buffer to read the event's metadata- Parameters:
reader- the reader to read into
-
getValueBuffer
org.agrona.DirectBuffer getValueBuffer()- Returns:
- a buffer containing the value of the event at offset
getValueOffset()()} and with lengthgetValueLength()()}.
-
getValueOffset
int getValueOffset()- Returns:
- the buffer offset where the event's value can read from
-
getValueLength
int getValueLength()- Returns:
- the length of the event's value
-
readValue
Wraps the given buffer to read the event's value.- Parameters:
reader- the buffer to read from
-
getVersion
short getVersion()Returns the version of the log entry descriptor used for serialization.
-