Package akka.persistence
Interface PersistentRepr
-
- All Superinterfaces:
Message
,java.io.Serializable
public interface PersistentRepr extends Message
Plugin API: representation of a persistent message in the journal plugin API.- See Also:
AsyncWriteJournal
,AsyncRecovery
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
deleted()
Not used, can always befalse
.java.lang.String
manifest()
Returns the event adapter manifest for the persistent payload (event) if available May be""
if event adapter manifest is not used.scala.Option<java.lang.Object>
metadata()
java.lang.Object
payload()
This persistent message's payload (the event).java.lang.String
persistenceId()
Persistent id that journals a persistent messageActorRef
sender()
Not used, can benull
long
sequenceNr()
This persistent message's sequence number.long
timestamp()
Thetimestamp
is the time the event was stored, in milliseconds since midnight, January 1, 1970 UTC (same asSystem.currentTimeMillis
).PersistentRepr
update(long sequenceNr, java.lang.String persistenceId, boolean deleted, ActorRef sender, java.lang.String writerUuid)
Creates a new copy of thisPersistentRepr
.long
update$default$1()
java.lang.String
update$default$2()
boolean
update$default$3()
ActorRef
update$default$4()
java.lang.String
update$default$5()
PersistentRepr
withManifest(java.lang.String manifest)
Creates a new persistent message with the specified event adaptermanifest
.PersistentRepr
withMetadata(java.lang.Object metadata)
PersistentRepr
withPayload(java.lang.Object payload)
Creates a new persistent message with the specifiedpayload
(event).PersistentRepr
withTimestamp(long newTimestamp)
java.lang.String
writerUuid()
Unique identifier of the writing persistent actor.
-
-
-
Method Detail
-
payload
java.lang.Object payload()
This persistent message's payload (the event).
-
manifest
java.lang.String manifest()
Returns the event adapter manifest for the persistent payload (event) if available May be""
if event adapter manifest is not used. Note that this is not the same as the manifest of the serialized representation of thepayload
.
-
persistenceId
java.lang.String persistenceId()
Persistent id that journals a persistent message
-
sequenceNr
long sequenceNr()
This persistent message's sequence number.
-
timestamp
long timestamp()
Thetimestamp
is the time the event was stored, in milliseconds since midnight, January 1, 1970 UTC (same asSystem.currentTimeMillis
).Value
0
is used if undefined.
-
withTimestamp
PersistentRepr withTimestamp(long newTimestamp)
-
metadata
scala.Option<java.lang.Object> metadata()
-
withMetadata
PersistentRepr withMetadata(java.lang.Object metadata)
-
writerUuid
java.lang.String writerUuid()
Unique identifier of the writing persistent actor. Used to detect anomalies with overlapping writes from multiple persistent actors, which can result in inconsistent replays.
-
withPayload
PersistentRepr withPayload(java.lang.Object payload)
Creates a new persistent message with the specifiedpayload
(event).
-
withManifest
PersistentRepr withManifest(java.lang.String manifest)
Creates a new persistent message with the specified event adaptermanifest
.
-
deleted
boolean deleted()
Not used, can always befalse
.Not used in new records stored with Akka v2.4, but old records from v2.3 may have this as
true
if it was a non-permanent delete.
-
sender
ActorRef sender()
Not used, can benull
-
update
PersistentRepr update(long sequenceNr, java.lang.String persistenceId, boolean deleted, ActorRef sender, java.lang.String writerUuid)
Creates a new copy of thisPersistentRepr
.
-
update$default$1
long update$default$1()
-
update$default$2
java.lang.String update$default$2()
-
update$default$3
boolean update$default$3()
-
update$default$4
ActorRef update$default$4()
-
update$default$5
java.lang.String update$default$5()
-
-