Class RecordedEvent

java.lang.Object
com.eventstore.dbclient.RecordedEvent

public class RecordedEvent extends Object
Represents a previously written event.
  • Method Details

    • getStreamId

      @NotNull public @NotNull String getStreamId()
      The stream that event belongs to.
    • getRevision

      @NotNull public @javax.validation.constraints.NotNull long getRevision()
      The event's stream revision number.
    • getEventId

      @NotNull public @NotNull UUID getEventId()
      The event's unique identifier.
    • getEventType

      @NotNull public @NotNull String getEventType()
      The event's type.
    • getEventData

      public byte[] getEventData()
      The event's payload data.
    • getEventDataAs

      @Deprecated public <A> A getEventDataAs(Class<A> clazz) throws IOException
      Deprecated.
      Deserialized representation of the event's payload. In this case, the payload is supposed to be JSON.
      Throws:
      IOException
    • getUserMetadata

      public byte[] getUserMetadata()
      The event's metadata.
    • getCreated

      @NotNull public @NotNull Instant getCreated()
      When the event was created.
    • getPosition

      @NotNull public @NotNull Position getPosition()
      The event's transaction log position.
    • getContentType

      @NotNull public @NotNull String getContentType()
      The event's content type. Could be application/json or application/octet-stream.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object