Trait

akka.persistence.typed.scaladsl

PersistentBehavior

Related Doc: package scaladsl

Permalink

trait PersistentBehavior[Command, Event, State] extends DeferredBehavior[Command]

Source
PersistentBehaviors.scala
Linear Supertypes
DeferredBehavior[Command], Behavior[Command], AnyRef, Any
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. PersistentBehavior
  2. DeferredBehavior
  3. Behavior
  4. AnyRef
  5. Any
Implicitly
  1. by BehaviorDecorators
  2. by BehaviorDecorators
  3. by any2stringadd
  4. by StringFormat
  5. by Ensuring
  6. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def apply(ctx: ActorContext[Command]): Behavior[Command]

    Permalink
    Definition Classes
    DeferredBehavior
  2. abstract def eventAdapter(adapter: EventAdapter[Event, _]): PersistentBehavior[Command, Event, State]

    Permalink

    Transform the event in another type before giving to the journal.

    Transform the event in another type before giving to the journal. Can be used to wrap events in types Journals understand but is of a different type than Event.

  3. abstract def onPersistFailure(backoffStrategy: BackoffSupervisorStrategy): PersistentBehavior[Command, Event, State]

    Permalink

    Back off strategy for persist failures.

    Back off strategy for persist failures.

    Specifically BackOff to prevent resume being used. Resume is not allowed as it will be unknown if the event has been persisted.

    If not specified the actor will be stopped on failure.

  4. abstract def onRecoveryCompleted(callback: (ActorContext[Command], State) ⇒ Unit): PersistentBehavior[Command, Event, State]

    Permalink

    The callback function is called to notify the actor that the recovery process is finished.

  5. abstract def onSnapshot(callback: (ActorContext[Command], SnapshotMetadata, Try[Done]) ⇒ Unit): PersistentBehavior[Command, Event, State]

    Permalink

    The callback function is called to notify when a snapshot is complete.

  6. abstract def snapshotEvery(numberOfEvents: Long): PersistentBehavior[Command, Event, State]

    Permalink

    Snapshot every N events

    Snapshot every N events

    numberOfEvents should be greater than 0

  7. abstract def snapshotWhen(predicate: (State, Event, Long) ⇒ Boolean): PersistentBehavior[Command, Event, State]

    Permalink

    Initiates a snapshot if the given function returns true.

    Initiates a snapshot if the given function returns true. When persisting multiple events at once the snapshot is triggered after all the events have been persisted.

    predicate receives the State, Event and the sequenceNr used for the Event

  8. abstract def withJournalPluginId(id: String): PersistentBehavior[Command, Event, State]

    Permalink

    Change the journal plugin id that this actor should use.

  9. abstract def withSnapshotPluginId(id: String): PersistentBehavior[Command, Event, State]

    Permalink

    Change the snapshot store plugin id that this actor should use.

  10. abstract def withSnapshotSelectionCriteria(selection: SnapshotSelectionCriteria): PersistentBehavior[Command, Event, State]

    Permalink

    Changes the snapshot selection criteria used by this behavior.

    Changes the snapshot selection criteria used by this behavior. By default the most recent snapshot is used, and the remaining state updates are recovered by replaying events from the sequence number up until which the snapshot reached.

    You may configure the behavior to skip replaying snapshots completely, in which case the recovery will be performed by replaying all events -- which may take a long time.

  11. abstract def withTagger(tagger: (Event) ⇒ Set[String]): PersistentBehavior[Command, Event, State]

    Permalink

    The tagger function should give event tags, which will be used in persistence query

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from PersistentBehavior[Command, Event, State] to any2stringadd[PersistentBehavior[Command, Event, State]] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (PersistentBehavior[Command, Event, State], B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from PersistentBehavior[Command, Event, State] to ArrowAssoc[PersistentBehavior[Command, Event, State]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def ensuring(cond: (PersistentBehavior[Command, Event, State]) ⇒ Boolean, msg: ⇒ Any): PersistentBehavior[Command, Event, State]

    Permalink
    Implicit information
    This member is added by an implicit conversion from PersistentBehavior[Command, Event, State] to Ensuring[PersistentBehavior[Command, Event, State]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  9. def ensuring(cond: (PersistentBehavior[Command, Event, State]) ⇒ Boolean): PersistentBehavior[Command, Event, State]

    Permalink
    Implicit information
    This member is added by an implicit conversion from PersistentBehavior[Command, Event, State] to Ensuring[PersistentBehavior[Command, Event, State]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  10. def ensuring(cond: Boolean, msg: ⇒ Any): PersistentBehavior[Command, Event, State]

    Permalink
    Implicit information
    This member is added by an implicit conversion from PersistentBehavior[Command, Event, State] to Ensuring[PersistentBehavior[Command, Event, State]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  11. def ensuring(cond: Boolean): PersistentBehavior[Command, Event, State]

    Permalink
    Implicit information
    This member is added by an implicit conversion from PersistentBehavior[Command, Event, State] to Ensuring[PersistentBehavior[Command, Event, State]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  12. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  13. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  14. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. def formatted(fmtstr: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from PersistentBehavior[Command, Event, State] to StringFormat[PersistentBehavior[Command, Event, State]] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  16. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  17. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  18. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  19. final def narrow[U <: Command]: Behavior[U]

    Permalink
    Definition Classes
    Behavior
  20. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  21. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  22. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  23. final def orElse(that: Behavior[Command]): Behavior[Command]

    Permalink
    Definition Classes
    Behavior
  24. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  25. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  26. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. def [B](y: B): (PersistentBehavior[Command, Event, State], B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from PersistentBehavior[Command, Event, State] to ArrowAssoc[PersistentBehavior[Command, Event, State]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Shadowed Implicit Value Members

  1. val behavior: Behavior[Command]

    Permalink
    Implicit information
    This member is added by an implicit conversion from PersistentBehavior[Command, Event, State] to BehaviorDecorators[Command] performed by method BehaviorDecorators in akka.actor.typed.Behavior.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (persistentBehavior: BehaviorDecorators[Command]).behavior
    Definition Classes
    BehaviorDecorators
  2. val behavior: Behavior[Command]

    Permalink
    Implicit information
    This member is added by an implicit conversion from PersistentBehavior[Command, Event, State] to BehaviorDecorators[Command] performed by method BehaviorDecorators in akka.actor.typed.Behavior.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (persistentBehavior: BehaviorDecorators[Command]).behavior
    Definition Classes
    BehaviorDecorators
  3. def widen[U](matcher: PartialFunction[U, Command]): Behavior[U]

    Permalink
    Implicit information
    This member is added by an implicit conversion from PersistentBehavior[Command, Event, State] to BehaviorDecorators[Command] performed by method BehaviorDecorators in akka.actor.typed.Behavior.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (persistentBehavior: BehaviorDecorators[Command]).widen(matcher)
    Definition Classes
    BehaviorDecorators
  4. def widen[U](matcher: PartialFunction[U, Command]): Behavior[U]

    Permalink
    Implicit information
    This member is added by an implicit conversion from PersistentBehavior[Command, Event, State] to BehaviorDecorators[Command] performed by method BehaviorDecorators in akka.actor.typed.Behavior.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (persistentBehavior: BehaviorDecorators[Command]).widen(matcher)
    Definition Classes
    BehaviorDecorators

Inherited from DeferredBehavior[Command]

Inherited from Behavior[Command]

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion BehaviorDecorators from PersistentBehavior[Command, Event, State] to BehaviorDecorators[Command]

Inherited by implicit conversion BehaviorDecorators from PersistentBehavior[Command, Event, State] to BehaviorDecorators[Command]

Inherited by implicit conversion any2stringadd from PersistentBehavior[Command, Event, State] to any2stringadd[PersistentBehavior[Command, Event, State]]

Inherited by implicit conversion StringFormat from PersistentBehavior[Command, Event, State] to StringFormat[PersistentBehavior[Command, Event, State]]

Inherited by implicit conversion Ensuring from PersistentBehavior[Command, Event, State] to Ensuring[PersistentBehavior[Command, Event, State]]

Inherited by implicit conversion ArrowAssoc from PersistentBehavior[Command, Event, State] to ArrowAssoc[PersistentBehavior[Command, Event, State]]

Ungrouped