Package akka.persistence.query
Class EventEnvelope
- java.lang.Object
-
- akka.persistence.query.EventEnvelope
-
- All Implemented Interfaces:
java.io.Serializable
,scala.Equals
,scala.Product
,scala.Product4<Offset,java.lang.String,java.lang.Object,java.lang.Object>
public final class EventEnvelope extends java.lang.Object implements scala.Product4<Offset,java.lang.String,java.lang.Object,java.lang.Object>, java.io.Serializable
Event wrapper adding meta data for the events in the result stream ofEventsByTagQuery
query, or similar queries.The
timestamp
is the time the event was stored, in milliseconds since midnight, January 1, 1970 UTC (same asSystem.currentTimeMillis
).- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description EventEnvelope(Offset offset, java.lang.String persistenceId, long sequenceNr, java.lang.Object event)
Deprecated.for binary compatibility.EventEnvelope(Offset offset, java.lang.String persistenceId, long sequenceNr, java.lang.Object event, long timestamp)
EventEnvelope(Offset offset, java.lang.String persistenceId, long sequenceNr, java.lang.Object event, long timestamp, scala.Option<java.lang.Object> eventMetadata)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Offset
_1()
java.lang.String
_2()
long
_3()
java.lang.Object
_4()
static EventEnvelope
apply(Offset offset, java.lang.String persistenceId, long sequenceNr, java.lang.Object event)
Deprecated.for binary compatibility.static EventEnvelope
apply(Offset offset, java.lang.String persistenceId, long sequenceNr, java.lang.Object event, long timestamp)
static EventEnvelope
apply(Offset offset, java.lang.String persistenceId, long sequenceNr, java.lang.Object event, long timestamp, scala.Option<java.lang.Object> meta)
boolean
canEqual(java.lang.Object that)
EventEnvelope
copy(Offset offset, java.lang.String persistenceId, long sequenceNr, java.lang.Object event)
Offset
copy$default$1()
java.lang.String
copy$default$2()
long
copy$default$3()
java.lang.Object
copy$default$4()
boolean
equals(java.lang.Object obj)
java.lang.Object
event()
scala.Option<java.lang.Object>
eventMetadata()
java.util.Optional<java.lang.Object>
getEventMetaData()
Java APIint
hashCode()
Offset
offset()
java.lang.String
persistenceId()
java.lang.String
productPrefix()
long
sequenceNr()
long
timestamp()
java.lang.String
toString()
static scala.Option<scala.Tuple4<Offset,java.lang.String,java.lang.Object,java.lang.Object>>
unapply(EventEnvelope arg)
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Constructor Detail
-
EventEnvelope
public EventEnvelope(Offset offset, java.lang.String persistenceId, long sequenceNr, java.lang.Object event, long timestamp, scala.Option<java.lang.Object> eventMetadata)
-
EventEnvelope
public EventEnvelope(Offset offset, java.lang.String persistenceId, long sequenceNr, java.lang.Object event)
Deprecated.for binary compatibility. Since 2.6.2.
-
EventEnvelope
public EventEnvelope(Offset offset, java.lang.String persistenceId, long sequenceNr, java.lang.Object event, long timestamp)
-
-
Method Detail
-
apply
public static EventEnvelope apply(Offset offset, java.lang.String persistenceId, long sequenceNr, java.lang.Object event, long timestamp)
-
apply
public static EventEnvelope apply(Offset offset, java.lang.String persistenceId, long sequenceNr, java.lang.Object event, long timestamp, scala.Option<java.lang.Object> meta)
-
apply
public static EventEnvelope apply(Offset offset, java.lang.String persistenceId, long sequenceNr, java.lang.Object event)
Deprecated.for binary compatibility. Since 2.6.2.
-
unapply
public static scala.Option<scala.Tuple4<Offset,java.lang.String,java.lang.Object,java.lang.Object>> unapply(EventEnvelope arg)
-
offset
public Offset offset()
-
persistenceId
public java.lang.String persistenceId()
-
sequenceNr
public long sequenceNr()
-
event
public java.lang.Object event()
-
timestamp
public long timestamp()
-
eventMetadata
public scala.Option<java.lang.Object> eventMetadata()
-
getEventMetaData
public java.util.Optional<java.lang.Object> getEventMetaData()
Java API
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Specified by:
equals
in interfacescala.Equals
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
copy
public EventEnvelope copy(Offset offset, java.lang.String persistenceId, long sequenceNr, java.lang.Object event)
-
copy$default$1
public Offset copy$default$1()
-
copy$default$2
public java.lang.String copy$default$2()
-
copy$default$3
public long copy$default$3()
-
copy$default$4
public java.lang.Object copy$default$4()
-
productPrefix
public java.lang.String productPrefix()
- Specified by:
productPrefix
in interfacescala.Product
-
_1
public Offset _1()
- Specified by:
_1
in interfacescala.Product4<Offset,java.lang.String,java.lang.Object,java.lang.Object>
-
_2
public java.lang.String _2()
- Specified by:
_2
in interfacescala.Product4<Offset,java.lang.String,java.lang.Object,java.lang.Object>
-
_3
public long _3()
- Specified by:
_3
in interfacescala.Product4<Offset,java.lang.String,java.lang.Object,java.lang.Object>
-
_4
public java.lang.Object _4()
- Specified by:
_4
in interfacescala.Product4<Offset,java.lang.String,java.lang.Object,java.lang.Object>
-
canEqual
public boolean canEqual(java.lang.Object that)
- Specified by:
canEqual
in interfacescala.Equals
-
-