Packages

object DurableStateBehavior

API May Change

Annotations
@ApiMayChange()
Source
DurableStateBehavior.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. DurableStateBehavior
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. type CommandHandler[Command, State] = (State, Command) => Effect[State]

    Type alias for the command handler function that defines how to act on commands.

    Type alias for the command handler function that defines how to act on commands.

    The type alias is not used in API signatures because it's easier to see (in IDE) what is needed when full function type is used. When defining the handler as a separate function value it can be useful to use the alias for shorter type signature.

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def apply[Command, State](persistenceId: PersistenceId, emptyState: State, commandHandler: (State, Command) => Effect[State]): DurableStateBehavior[Command, State]

    Create a Behavior for a persistent actor with durable storage of its state.

    Create a Behavior for a persistent actor with durable storage of its state.

    persistenceId

    stable unique identifier for the DurableStateBehavior

    emptyState

    the intial state for the entity before any state has been stored

    commandHandler

    map commands to effects e.g. persisting state, replying to commands

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  9. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. def lastSequenceNumber(context: ActorContext[_]): Long

    The last sequence number that was persisted, can only be called from inside the handlers of a DurableStateBehavior

  13. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  15. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  16. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  17. def toString(): String
    Definition Classes
    AnyRef → Any
  18. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  19. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  20. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  21. def withEnforcedReplies[Command, State](persistenceId: PersistenceId, emptyState: State, commandHandler: (State, Command) => ReplyEffect[State]): DurableStateBehavior[Command, State]

    Create a Behavior for a persistent actor that is enforcing that replies to commands are not forgotten.

    Create a Behavior for a persistent actor that is enforcing that replies to commands are not forgotten. Then there will be compilation errors if the returned effect isn't a ReplyEffect, which can be created with Effect.reply, Effect.noReply, EffectBuilder.thenReply, or EffectBuilder.thenNoReply.

  22. object CommandHandler

    The CommandHandler defines how to act on commands.

    The CommandHandler defines how to act on commands. A CommandHandler is a function:

    (State, Command) => Effect[State]

    The CommandHandler#command is useful for simple commands that don't need the state and context.

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from AnyRef

Inherited from Any

Ungrouped