Class BehaviorSetup<C,​E,​S>

  • public final class BehaviorSetup<C,​E,​S>
    extends java.lang.Object
    INTERNAL API: Carry state for the Persistent behavior implementation behaviors.
    • Method Detail

      • emptyState

        public S emptyState()
      • commandHandler

        public scala.Function2<S,​C,​Effect<E,​S>> commandHandler()
      • eventHandler

        public scala.Function2<S,​E,​S> eventHandler()
      • tagger

        public scala.Function1<E,​scala.collection.immutable.Set<java.lang.String>> tagger()
      • eventAdapter

        public EventAdapter<E,​java.lang.Object> eventAdapter()
      • snapshotWhen

        public scala.Function3<S,​E,​java.lang.Object,​java.lang.Object> snapshotWhen()
      • holdingRecoveryPermit

        public boolean holdingRecoveryPermit()
      • holdingRecoveryPermit_$eq

        public void holdingRecoveryPermit_$eq​(boolean x$1)
      • publishEvents

        public boolean publishEvents()
      • snapshotStore

        public ActorRef snapshotStore()
      • replicaId

        public scala.Option<ReplicaId> replicaId()
      • selfClassic

        public ActorRef selfClassic()
      • internalLogger

        public org.slf4j.Logger internalLogger()
      • setMdcPhase

        public BehaviorSetup<C,​E,​S> setMdcPhase​(java.lang.String phaseName)
      • startRecoveryTimer

        public void startRecoveryTimer​(boolean snapshot)
      • cancelRecoveryTimer

        public void cancelRecoveryTimer()
      • onSignal

        public <T> boolean onSignal​(S state,
                                    Signal signal,
                                    boolean catchAndLog)
        Applies the signalHandler if defined and returns true, otherwise returns false. If an exception is thrown and catchAndLog=true it is logged and returns true, otherwise it is thrown.

        catchAndLog=true should be used for "unknown" signals in the phases before Running to avoid restart loops if restart supervision is used.