Package com.eventstore.dbclient
Class RecordedEvent
- java.lang.Object
-
- com.eventstore.dbclient.RecordedEvent
-
public class RecordedEvent extends java.lang.Object
Represents a previously written event.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
@NotNull java.lang.String
getContentType()
The event's content type.@NotNull java.time.Instant
getCreated()
When the event was created.byte[]
getEventData()
The event's payload data.<A> A
getEventDataAs(java.lang.Class<A> clazz)
Deprecated.@NotNull java.util.UUID
getEventId()
The event's unique identifier.@NotNull java.lang.String
getEventType()
The event's type.@NotNull Position
getPosition()
The event's transaction log position.@javax.validation.constraints.NotNull long
getRevision()
The event's stream revision number.@NotNull java.lang.String
getStreamId()
The stream that event belongs to.byte[]
getUserMetadata()
The event's metadata.int
hashCode()
java.lang.String
toString()
-
-
-
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 classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-