Package akka.persistence.typed.internal
Class ReplayingEvents<C,E,S>
- java.lang.Object
-
- akka.actor.typed.Behavior<T>
-
- akka.actor.typed.ExtensibleBehavior<T>
-
- akka.actor.typed.scaladsl.AbstractBehavior<InternalProtocol>
-
- akka.persistence.typed.internal.ReplayingEvents<C,E,S>
-
- All Implemented Interfaces:
JournalInteractions<C,E,S>
,Running.WithSeqNrAccessible
,SnapshotInteractions<C,E,S>
,StashManagement<C,E,S>
public final class ReplayingEvents<C,E,S> extends AbstractBehavior<InternalProtocol> implements JournalInteractions<C,E,S>, SnapshotInteractions<C,E,S>, StashManagement<C,E,S>, Running.WithSeqNrAccessible
Called whenever a message replay fails. By default it logs the error.The actor is always stopped after this method has been invoked.
param: cause failure cause. param: event the event that was being processed when the exception was thrown
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ReplayingEvents.ReplayingState<State>
static class
ReplayingEvents.ReplayingState$
-
Nested classes/interfaces inherited from class akka.actor.typed.Behavior
Behavior.BehaviorDecorators<T>, Behavior.BehaviorDecorators$, Behavior.DeferredBehavior<T>, Behavior.DeferredBehavior$, Behavior.EmptyBehavior$, Behavior.FailedBehavior, Behavior.IgnoreBehavior$, Behavior.SameBehavior$, Behavior.StoppedBehavior<T>, Behavior.StoppedBehavior$, Behavior.UnhandledBehavior$
-
-
Constructor Summary
Constructors Constructor Description ReplayingEvents(BehaviorSetup<C,E,S> setup, ReplayingEvents.ReplayingState<S> state)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <C,E,S>
Behavior<InternalProtocol>apply(BehaviorSetup<C,E,S> setup, ReplayingEvents.ReplayingState<S> state)
long
currentSequenceNumber()
Behavior<InternalProtocol>
onMessage(InternalProtocol msg)
protected Behavior<InternalProtocol>
onRecoveryTick(boolean snapshot)
scala.PartialFunction<Signal,Behavior<InternalProtocol>>
onSignal()
Override this method to process an incomingSignal
and return the next behavior.Behavior<InternalProtocol>
onSnapshotterResponse(SnapshotProtocol.Response response)
BehaviorSetup<C,E,S>
setup()
ReplayingEvents.ReplayingState<S>
state()
void
state_$eq(ReplayingEvents.ReplayingState<S> x$1)
-
Methods inherited from class akka.actor.typed.scaladsl.AbstractBehavior
receive, receiveSignal
-
Methods inherited from class akka.actor.typed.Behavior
_tag, BehaviorDecorators, canonicalize, empty, existsInStack, failed, ignore, interpretMessage, interpretSignal, isAlive, isDeferred, isUnhandled, narrow, orElse, same, start, stopped, stopped, unhandled, unhandledSignal, unsafeCast, validateAsInitial
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface akka.persistence.typed.internal.JournalInteractions
internalDeleteEvents, internalPersist, internalPersistAll, replayEvents, requestRecoveryPermit, returnPermitOnStop, tryReturnRecoveryPermit
-
Methods inherited from interface akka.persistence.typed.internal.SnapshotInteractions
internalDeleteSnapshots, internalSaveSnapshot, loadSnapshot
-
Methods inherited from interface akka.persistence.typed.internal.StashManagement
context, isInternalStashEmpty, isUnstashAllInProgress, logStashMessage, logUnstashAll, logUnstashMessage, stash, stashInternal, stashState, stashUser, tryUnstashOne, unstashAll
-
-
-
-
Constructor Detail
-
ReplayingEvents
public ReplayingEvents(BehaviorSetup<C,E,S> setup, ReplayingEvents.ReplayingState<S> state)
-
-
Method Detail
-
apply
public static <C,E,S> Behavior<InternalProtocol> apply(BehaviorSetup<C,E,S> setup, ReplayingEvents.ReplayingState<S> state)
-
setup
public BehaviorSetup<C,E,S> setup()
- Specified by:
setup
in interfaceJournalInteractions<C,E,S>
- Specified by:
setup
in interfaceSnapshotInteractions<C,E,S>
- Specified by:
setup
in interfaceStashManagement<C,E,S>
-
state
public ReplayingEvents.ReplayingState<S> state()
-
state_$eq
public void state_$eq(ReplayingEvents.ReplayingState<S> x$1)
-
onMessage
public Behavior<InternalProtocol> onMessage(InternalProtocol msg)
- Specified by:
onMessage
in classAbstractBehavior<InternalProtocol>
-
onSignal
public scala.PartialFunction<Signal,Behavior<InternalProtocol>> onSignal()
Description copied from class:AbstractBehavior
Override this method to process an incomingSignal
and return the next behavior. This means that all lifecycle hooks, ReceiveTimeout, Terminated and Failed messages can initiate a behavior change.The returned behavior can in addition to normal behaviors be one of the canned special objects:
* returning
stopped
will terminate this Behavior * returningthis
orsame
designates to reuse the current Behavior * returningunhandled
keeps the same Behavior and signals that the message was not yet handledBy default, partial function is empty and does not handle any signals.
- Overrides:
onSignal
in classAbstractBehavior<InternalProtocol>
- Returns:
- (undocumented)
-
onRecoveryTick
protected Behavior<InternalProtocol> onRecoveryTick(boolean snapshot)
-
onSnapshotterResponse
public Behavior<InternalProtocol> onSnapshotterResponse(SnapshotProtocol.Response response)
-
currentSequenceNumber
public long currentSequenceNumber()
- Specified by:
currentSequenceNumber
in interfaceRunning.WithSeqNrAccessible
-
-