Package org.apache.pekko.persistence
Interface PersistentRepr
- All Superinterfaces:
Message
,Serializable
Plugin API: representation of a persistent message in the journal plugin API.
- See Also:
-
pekko.persistence.journal.AsyncWriteJournal
pekko.persistence.journal.AsyncRecovery
-
Method Summary
Modifier and TypeMethodDescriptionboolean
deleted()
Not used, can always befalse
.manifest()
Returns the event adapter manifest for the persistent payload (event) if available May be""
if event adapter manifest is not used.scala.Option<Object>
metadata()
payload()
This persistent message's payload (the event).Persistent id that journals a persistent messagesender()
Not used, can benull
long
This persistent message's sequence number.long
Thetimestamp
is the time the event was stored, in milliseconds since midnight, January 1, 1970 UTC (same asSystem.currentTimeMillis
).Creates a new copy of thisPersistentRepr
.long
boolean
withManifest
(String manifest) Creates a new persistent message with the specified event adaptermanifest
.withMetadata
(Object metadata) withPayload
(Object payload) Creates a new persistent message with the specifiedpayload
(event).withTimestamp
(long newTimestamp) Unique identifier of the writing persistent actor.
-
Method Details
-
payload
Object payload()This persistent message's payload (the event). -
manifest
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
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
-
metadata
scala.Option<Object> metadata() -
withMetadata
-
writerUuid
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
Creates a new persistent message with the specifiedpayload
(event). -
withManifest
Creates a new persistent message with the specified event adaptermanifest
. -
deleted
boolean deleted()Not used, can always befalse
. -
sender
ActorRef sender()Not used, can benull
-
update
PersistentRepr update(long sequenceNr, String persistenceId, boolean deleted, ActorRef sender, String writerUuid) Creates a new copy of thisPersistentRepr
. -
update$default$1
long update$default$1() -
update$default$2
String update$default$2() -
update$default$3
boolean update$default$3() -
update$default$4
ActorRef update$default$4() -
update$default$5
String update$default$5()
-