Class RecordedEvent


  • public class RecordedEvent
    extends java.lang.Object
    Represents a previously written event.
    • Method Detail

      • getStreamId

        @NotNull
        public @NotNull java.lang.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 java.util.UUID getEventId()
        The event's unique identifier.
      • getEventType

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

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

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

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

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

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

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

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

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

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object