final class EventEnvelope[Event] extends AnyRef
- Alphabetic
- By Inheritance
- EventEnvelope
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new EventEnvelope(offset: Offset, persistenceId: String, sequenceNr: Long, eventOption: Option[Event], timestamp: Long, eventMetadata: [Any], entityType: String, slice: Int)
- new EventEnvelope(offset: Offset, persistenceId: String, sequenceNr: Long, eventOption: Option[Event], timestamp: Long, eventMetadata: [Any], entityType: String, slice: Int, filtered: Boolean, source: String)
- new EventEnvelope(offset: Offset, persistenceId: String, sequenceNr: Long, eventOption: Option[Event], timestamp: Long, _eventMetadata: [Any], entityType: String, slice: Int, filtered: Boolean, source: String, tags: Set[String])
Value Members
- val entityType: String
- def equals(obj: Any): Boolean
- Definition Classes
- EventEnvelope → AnyRef → Any
- def event: Event
- val eventOption: Option[Event]
- val filtered: Boolean
- def getEvent(): Event
Java API
- def getMetadata[M](metadataType: Class[M]): Optional[M]
Java API: The metadata of a given type that is associated with the event.
- def getOptionalEvent(): Optional[Event]
Java API
- def getTags(): Set[String]
Java API:
- def hashCode(): Int
- Definition Classes
- EventEnvelope → AnyRef → Any
- def metadata[M](implicit arg0: ClassTag[M]): Option[M]
Scala API: The metadata of a given type that is associated with the event.
- val offset: Offset
- val persistenceId: String
- def removeMetadata[M](implicit classTag: ClassTag[M]): EventEnvelope[Event]
Scala API: Drop metadata of the given type if present
- def removeMetadata(metadataType: Class[_]): EventEnvelope[Event]
Java API: Drop metadata of the given type if present
- val sequenceNr: Long
- val slice: Int
- val source: String
- val tags: Set[String]
- val timestamp: Long
- def toString(): String
- Definition Classes
- EventEnvelope → AnyRef → Any
- def withEvent(event: Event): EventEnvelope[Event]
- def withEventOption(eventOption: Option[Event]): EventEnvelope[Event]
- def withMetadata(metadata: Any): EventEnvelope[Event]
- def withPersistenceId(persistenceId: String, entityType: String, slice: Int): EventEnvelope[Event]
entityType
andslice
should be derived from thepersistenceId
, but must be explicitly defined when changing thepersistenceId
of the envelope.entityType
andslice
should be derived from thepersistenceId
, but must be explicitly defined when changing thepersistenceId
of the envelope. Theslice
should be calculated with akka.persistence.Persistence.sliceForPersistenceId for the givenpersistenceId
. TheentityType
should be extracted from thepersistenceId
withakka.persistence.typed.PersistenceId.extractEntityType
. - def withTags(tags: Set[String]): EventEnvelope[Event]
Event wrapper adding meta data for the events in the result stream of akka.persistence.query.typed.scaladsl.EventsBySliceQuery query, or similar queries.
If the
event
is not defined it has not been loaded yet. It can be loaded with akka.persistence.query.typed.scaladsl.LoadEventQuery.The
timestamp
is the time the event was stored, in milliseconds since midnight, January 1, 1970 UTC (same asSystem.currentTimeMillis
).It is an improved
EventEnvelope
compared to akka.persistence.query.EventEnvelope.