IdentityEventAdapter

org.apache.pekko.persistence.journal.IdentityEventAdapter$
case object IdentityEventAdapter extends EventAdapter

No-op model adapter which passes through the incoming events as-is.

Attributes

Source
EventAdapter.scala
Graph
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait EventAdapter
class Object
trait Matchable
class Any
Show all
Self type

Members list

Type members

Inherited types

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Singleton
Source
Mirror.scala

Attributes

Inherited from:
Singleton
Source
Mirror.scala

The name of the type

The name of the type

Attributes

Inherited from:
Mirror
Source
Mirror.scala
type MirroredMonoType = Singleton.this.type

The mirrored *-type

The mirrored *-type

Attributes

Inherited from:
Singleton
Source
Mirror.scala
type MirroredType = Singleton.this.type

Attributes

Inherited from:
Singleton
Source
Mirror.scala

Value members

Concrete methods

override def fromJournal(event: Any, manifest: String): EventSeq

Convert a event from its journal model to the applications domain model.

Convert a event from its journal model to the applications domain model.

One event may be adapter into multiple (or none) events which should be delivered to the org.apache.pekko.persistence.PersistentActor. Use the specialised org.apache.pekko.persistence.journal.EventSeq#single method to emit exactly one event, or org.apache.pekko.persistence.journal.EventSeq#empty in case the adapter is not handling this event. Multiple EventAdapter instances are applied in order as defined in configuration and their emitted event seqs are concatenated and delivered in order to the PersistentActor.

Value parameters

event

event to be adapted before delivering to the PersistentActor

manifest

optionally provided manifest (type hint) in case the Adapter has stored one for this event, "" if none

Attributes

Returns

sequence containing the adapted events (possibly zero) which will be delivered to the PersistentActor

Definition Classes
Source
EventAdapter.scala
override def manifest(event: Any): String

Return the manifest (type hint) that will be provided in the fromJournal method. Use "" if manifest is not needed.

Return the manifest (type hint) that will be provided in the fromJournal method. Use "" if manifest is not needed.

Attributes

Definition Classes
Source
EventAdapter.scala
override def toJournal(event: Any): Any

Convert domain event to journal event type.

Convert domain event to journal event type.

Some journal may require a specific type to be returned to them, for example if a primary key has to be associated with each event then a journal may require adapters to return com.example.myjournal.EventWithPrimaryKey(event, key).

The toJournal adaptation must be an 1-to-1 transformation. It is not allowed to drop incoming events during the toJournal adaptation.

Value parameters

event

the application-side domain event to be adapted to the journal model

Attributes

Returns

the adapted event object, possibly the same object if no adaptation was performed

Definition Classes
Source
EventAdapter.scala

Inherited methods

Create a new instance of type T with elements taken from product p.

Create a new instance of type T with elements taken from product p.

Attributes

Inherited from:
Singleton
Source
Mirror.scala

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product