final class EventEnvelope[Event] extends AnyRef

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 as System.currentTimeMillis).

It is an improved EventEnvelope compared to akka.persistence.query.EventEnvelope.

Source
EventEnvelope.scala
Linear Supertypes
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. EventEnvelope
  2. AnyRef
  3. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new EventEnvelope(offset: Offset, persistenceId: String, sequenceNr: Long, eventOption: Option[Event], timestamp: Long, eventMetadata: [Any], entityType: String, slice: Int)
  2. new EventEnvelope(offset: Offset, persistenceId: String, sequenceNr: Long, eventOption: Option[Event], timestamp: Long, eventMetadata: [Any], entityType: String, slice: Int, filtered: Boolean, source: String)
  3. 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

  1. val entityType: String
  2. def equals(obj: Any): Boolean
    Definition Classes
    EventEnvelope → AnyRef → Any
  3. def event: Event
  4. val eventOption: Option[Event]
  5. val filtered: Boolean
  6. def getEvent(): Event

    Java API

  7. def getMetadata[M](metadataType: Class[M]): Optional[M]

    Java API: The metadata of a given type that is associated with the event.

  8. def getOptionalEvent(): Optional[Event]

    Java API

  9. def getTags(): Set[String]

    Java API:

  10. def hashCode(): Int
    Definition Classes
    EventEnvelope → AnyRef → Any
  11. def metadata[M](implicit arg0: ClassTag[M]): Option[M]

    Scala API: The metadata of a given type that is associated with the event.

  12. val offset: Offset
  13. val persistenceId: String
  14. def removeMetadata[M](implicit classTag: ClassTag[M]): EventEnvelope[Event]

    Scala API: Drop metadata of the given type if present

  15. def removeMetadata(metadataType: Class[_]): EventEnvelope[Event]

    Java API: Drop metadata of the given type if present

  16. val sequenceNr: Long
  17. val slice: Int
  18. val source: String
  19. val tags: Set[String]
  20. val timestamp: Long
  21. def toString(): String
    Definition Classes
    EventEnvelope → AnyRef → Any
  22. def withEvent(event: Event): EventEnvelope[Event]
  23. def withEventOption(eventOption: Option[Event]): EventEnvelope[Event]
  24. def withMetadata(metadata: Any): EventEnvelope[Event]
  25. def withPersistenceId(persistenceId: String, entityType: String, slice: Int): EventEnvelope[Event]

    entityType and slice should be derived from the persistenceId, but must be explicitly defined when changing the persistenceId of the envelope.

    entityType and slice should be derived from the persistenceId, but must be explicitly defined when changing the persistenceId of the envelope. The slice should be calculated with akka.persistence.Persistence.sliceForPersistenceId for the given persistenceId. The entityType should be extracted from the persistenceId with akka.persistence.typed.PersistenceId.extractEntityType.

  26. def withTags(tags: Set[String]): EventEnvelope[Event]

Deprecated Value Members

  1. def eventMetadata: [Any]

    Scala API

    Scala API

    Annotations
    @deprecated
    Deprecated

    Use metadata with metadataType parameter

  2. def getEventMetaData(): [AnyRef]

    Java API

    Java API

    Annotations
    @deprecated
    Deprecated

    Use getMetadata with metadataType parameter