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
-
-
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<Inner>, Behavior.BehaviorDecorators$
-
Nested classes/interfaces inherited from interface akka.persistence.typed.internal.JournalInteractions
JournalInteractions.EventToPersist, JournalInteractions.EventToPersist$
-
-
Constructor Summary
Constructors Constructor Description ReplayingEvents(BehaviorSetup<C,E,S> setup, ReplayingEvents.ReplayingState<S> state)
-
Method Summary
-
Methods inherited from class akka.actor.typed.scaladsl.AbstractBehavior
context, receive, receiveSignal
-
Methods inherited from class akka.actor.typed.Behavior
_tag, BehaviorDecorators, canonicalize, existsInStack, interpretMessage, interpretSignal, isAlive, isDeferred, isUnhandled, narrow, start, 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, onWriteInitiated, onWritesInitiated, 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)
-
onRecoveryStart
public void onRecoveryStart(ActorContext<?> context)
-
onRecoveryComplete
public void onRecoveryComplete(ActorContext<?> context)
-
onRecoveryFailed
public void onRecoveryFailed(ActorContext<?> context, java.lang.Throwable reason, scala.Option<java.lang.Object> event)
-
onMessage
public Behavior<InternalProtocol> onMessage(InternalProtocol msg)
Description copied from class:AbstractBehavior
Implement this method to process an incoming message and return the next behavior.The returned behavior can in addition to normal behaviors be one of the canned special objects:
- returning
stopped
will terminate this Behavior - returning
this
orsame
designates to reuse the current Behavior - returning
unhandled
keeps the same Behavior and signals that the message was not yet handled
- Specified by:
onMessage
in classAbstractBehavior<InternalProtocol>
- returning
-
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>
-
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
-
-