Interface PersistentRepr

All Superinterfaces:
Message, Serializable

public interface PersistentRepr extends Message
Plugin API: representation of a persistent message in the journal plugin API.

See Also:
  • pekko.persistence.journal.AsyncWriteJournal
  • pekko.persistence.journal.AsyncRecovery
  • 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 the payload.
    • persistenceId

      String persistenceId()
      Persistent id that journals a persistent message
    • sequenceNr

      long sequenceNr()
      This persistent message's sequence number.
    • timestamp

      long timestamp()
      The timestamp is the time the event was stored, in milliseconds since midnight, January 1, 1970 UTC (same as System.currentTimeMillis).

      Value 0 is used if undefined.

    • withTimestamp

      PersistentRepr withTimestamp(long newTimestamp)
    • metadata

      scala.Option<Object> metadata()
    • withMetadata

      PersistentRepr withMetadata(Object metadata)
    • 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

      PersistentRepr withPayload(Object payload)
      Creates a new persistent message with the specified payload (event).
    • withManifest

      PersistentRepr withManifest(String manifest)
      Creates a new persistent message with the specified event adapter manifest.
    • deleted

      boolean deleted()
      Not used, can always be false.
    • sender

      ActorRef sender()
      Not used, can be null
    • update

      PersistentRepr update(long sequenceNr, String persistenceId, boolean deleted, ActorRef sender, String writerUuid)
      Creates a new copy of this PersistentRepr.
    • 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()