Package akka.persistence.typed.internal
Class BehaviorSetup<C,E,S>
- java.lang.Object
-
- akka.persistence.typed.internal.BehaviorSetup<C,E,S>
-
public final class BehaviorSetup<C,E,S> extends java.lang.Object
catchAndLog=true
should be used for "unknown" signals in the phases before Running to avoid restart loops if restart supervision is used.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BehaviorSetup.NoSnapshot$
static interface
BehaviorSetup.SnapshotAfterPersist
static class
BehaviorSetup.SnapshotWithoutRetention$
static class
BehaviorSetup.SnapshotWithRetention$
-
Constructor Summary
Constructors Constructor Description BehaviorSetup(ActorContext<InternalProtocol> context, PersistenceId persistenceId, S emptyState, scala.Function2<S,C,Effect<E,S>> commandHandler, scala.Function2<S,E,S> eventHandler, EventSourcedBehaviorImpl.WriterIdentity writerIdentity, scala.PartialFunction<scala.Tuple2<S,Signal>,scala.runtime.BoxedUnit> signalHandler, scala.Function1<E,scala.collection.immutable.Set<java.lang.String>> tagger, EventAdapter<E,?> eventAdapter, scala.Function3<S,E,java.lang.Object,java.lang.Object> snapshotWhen, Recovery recovery, RetentionCriteria retention, boolean holdingRecoveryPermit, EventSourcedSettings settings, StashState stashState)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cancelRecoveryTimer()
scala.Function2<S,C,Effect<E,S>>
commandHandler()
ActorContext<InternalProtocol>
context()
S
emptyState()
EventAdapter<E,?>
eventAdapter()
scala.Function2<S,E,S>
eventHandler()
boolean
holdingRecoveryPermit()
void
holdingRecoveryPermit_$eq(boolean x$1)
ActorRef
journal()
Logger
log()
void
onSignal(S state, Signal signal, boolean catchAndLog)
catchAndLog=true
should be used for "unknown" signals in the phases before Running to avoid restart loops if restart supervision is used.Persistence
persistence()
PersistenceId
persistenceId()
Recovery
recovery()
RetentionCriteria
retention()
ActorRef
selfUntyped()
BehaviorSetup<C,E,S>
setMdc(java.lang.String phaseName)
BehaviorSetup<C,E,S>
setMdc(scala.collection.immutable.Map<java.lang.String,java.lang.Object> newMdc)
EventSourcedSettings
settings()
BehaviorSetup.SnapshotAfterPersist
shouldSnapshot(S state, E event, long sequenceNr)
ActorRef
snapshotStore()
scala.Function3<S,E,java.lang.Object,java.lang.Object>
snapshotWhen()
void
startRecoveryTimer(boolean snapshot)
StashState
stashState()
scala.Function1<E,scala.collection.immutable.Set<java.lang.String>>
tagger()
EventSourcedBehaviorImpl.WriterIdentity
writerIdentity()
-
-
-
Constructor Detail
-
BehaviorSetup
public BehaviorSetup(ActorContext<InternalProtocol> context, PersistenceId persistenceId, S emptyState, scala.Function2<S,C,Effect<E,S>> commandHandler, scala.Function2<S,E,S> eventHandler, EventSourcedBehaviorImpl.WriterIdentity writerIdentity, scala.PartialFunction<scala.Tuple2<S,Signal>,scala.runtime.BoxedUnit> signalHandler, scala.Function1<E,scala.collection.immutable.Set<java.lang.String>> tagger, EventAdapter<E,?> eventAdapter, scala.Function3<S,E,java.lang.Object,java.lang.Object> snapshotWhen, Recovery recovery, RetentionCriteria retention, boolean holdingRecoveryPermit, EventSourcedSettings settings, StashState stashState)
-
-
Method Detail
-
context
public ActorContext<InternalProtocol> context()
-
persistenceId
public PersistenceId persistenceId()
-
emptyState
public S emptyState()
-
writerIdentity
public EventSourcedBehaviorImpl.WriterIdentity writerIdentity()
-
tagger
public scala.Function1<E,scala.collection.immutable.Set<java.lang.String>> tagger()
-
eventAdapter
public EventAdapter<E,?> eventAdapter()
-
recovery
public Recovery recovery()
-
retention
public RetentionCriteria retention()
-
holdingRecoveryPermit
public boolean holdingRecoveryPermit()
-
holdingRecoveryPermit_$eq
public void holdingRecoveryPermit_$eq(boolean x$1)
-
settings
public EventSourcedSettings settings()
-
stashState
public StashState stashState()
-
persistence
public Persistence persistence()
-
journal
public ActorRef journal()
-
snapshotStore
public ActorRef snapshotStore()
-
selfUntyped
public ActorRef selfUntyped()
-
log
public Logger log()
-
setMdc
public BehaviorSetup<C,E,S> setMdc(scala.collection.immutable.Map<java.lang.String,java.lang.Object> newMdc)
-
setMdc
public BehaviorSetup<C,E,S> setMdc(java.lang.String phaseName)
-
startRecoveryTimer
public void startRecoveryTimer(boolean snapshot)
-
cancelRecoveryTimer
public void cancelRecoveryTimer()
-
onSignal
public void onSignal(S state, Signal signal, boolean catchAndLog)
catchAndLog=true
should be used for "unknown" signals in the phases before Running to avoid restart loops if restart supervision is used.- Parameters:
state
- (undocumented)signal
- (undocumented)catchAndLog
- (undocumented)
-
shouldSnapshot
public BehaviorSetup.SnapshotAfterPersist shouldSnapshot(S state, E event, long sequenceNr)
-
-