Class EventSourcedBehavior$


  • public class EventSourcedBehavior$
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static EventSourcedBehavior$ MODULE$
      Static reference to the singleton instance of this Scala object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <Command,​Event,​State>
      EventSourcedBehavior<Command,​Event,​State>
      apply​(PersistenceId persistenceId, State emptyState, scala.Function2<State,​Command,​Effect<Event,​State>> commandHandler, scala.Function2<State,​Event,​State> eventHandler)
      Create a Behavior for a persistent actor.
      <Command extends ExpectingReply<?>,​Event,​State>
      EventSourcedBehavior<Command,​Event,​State>
      withEnforcedReplies​(PersistenceId persistenceId, State emptyState, scala.Function2<State,​Command,​ReplyEffect<Event,​State>> commandHandler, scala.Function2<State,​Event,​State> eventHandler)
      Create a Behavior for a persistent actor that is enforcing that replies to commands are not forgotten.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • MODULE$

        public static final EventSourcedBehavior$ MODULE$
        Static reference to the singleton instance of this Scala object.
    • Constructor Detail

      • EventSourcedBehavior$

        public EventSourcedBehavior$()
    • Method Detail

      • apply

        public <Command,​Event,​State> EventSourcedBehavior<Command,​Event,​State> apply​(PersistenceId persistenceId,
                                                                                                             State emptyState,
                                                                                                             scala.Function2<State,​Command,​Effect<Event,​State>> commandHandler,
                                                                                                             scala.Function2<State,​Event,​State> eventHandler)
        Create a Behavior for a persistent actor.
        Parameters:
        persistenceId - (undocumented)
        emptyState - (undocumented)
        commandHandler - (undocumented)
        eventHandler - (undocumented)
        Returns:
        (undocumented)
      • withEnforcedReplies

        public <Command extends ExpectingReply<?>,​Event,​State> EventSourcedBehavior<Command,​Event,​State> withEnforcedReplies​(PersistenceId persistenceId,
                                                                                                                                                     State emptyState,
                                                                                                                                                     scala.Function2<State,​Command,​ReplyEffect<Event,​State>> commandHandler,
                                                                                                                                                     scala.Function2<State,​Event,​State> eventHandler)
        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, Effect.thenReply, or Effect.thenNoReply.
        Parameters:
        persistenceId - (undocumented)
        emptyState - (undocumented)
        commandHandler - (undocumented)
        eventHandler - (undocumented)
        Returns:
        (undocumented)