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.DirectBuffershortintlonglonglongorg.agrona.DirectBufferintintbooleanvoidreadMetadata(BufferReader reader) Wraps the given buffer to read the event's metadatavoidreadValue(BufferReader reader) Wraps the given buffer to read the event's value.Methods inherited from interface io.camunda.zeebe.util.buffer.BufferWriter
getLength, write
-
Method Details
-
isProcessed
boolean isProcessed()- Returns:
- returns true if record is already processed
-
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
short 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
-