Class EventSourcedBehavior.CommandHandler$

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

public static class EventSourcedBehavior.CommandHandler$ extends Object
The CommandHandler defines how to act on commands. A CommandHandler is a function:


   (State, Command) => Effect[Event, 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, Event, State> scala.Function2<State,Command,Effect<Event,State>> command(scala.Function1<Command,Effect<Event,State>> commandHandler)
      Convenience for simple commands that don't need the state and context.