Interface LoggedEvent

All Superinterfaces:
BufferWriter
All Known Implementing Classes:
LoggedEventImpl

public interface LoggedEvent extends BufferWriter
Represents an event on the log stream.
  • 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 length getMetadataLength().
    • getMetadataOffset

      int getMetadataOffset()
      Returns:
      the offset of the event's metadata
    • getMetadataLength

      int getMetadataLength()
      Returns:
      the length of the event's metadata
    • readMetadata

      void readMetadata(BufferReader reader)
      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 length getValueLength() ()}.
    • 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

      void readValue(BufferReader reader)
      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.