Class DurableStateBehavior.CommandHandler$

java.lang.Object
org.apache.pekko.persistence.typed.state.scaladsl.DurableStateBehavior.CommandHandler$
Enclosing interface:
DurableStateBehavior<Command,State>

public static class DurableStateBehavior.CommandHandler$ extends Object
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.

  • Field Details

  • Constructor Details

    • CommandHandler$

      public CommandHandler$()
  • Method Details

    • command

      public <Command, State> scala.Function2<State,Command,Effect<State>> command(scala.Function1<Command,Effect<State>> commandHandler)
      Convenience for simple commands that don't need the state and context.