Package akka.persistence.fsm
Interface PersistentFSM<S extends PersistentFSM.FSMState,D,E>
-
- All Superinterfaces:
Actor
,ActorLogging
,Eventsourced
,Listeners
,PersistenceIdentity
,PersistenceRecovery
,PersistenceStash
,PersistentActor
,PersistentFSMBase<S,D,E>
,RequiresMessageQueue<DequeBasedMessageQueueSemantics>
,Snapshotter
,Stash
,StashFactory
,StashSupport
,UnrestrictedStash
- All Known Implementing Classes:
AbstractPersistentFSM
,AbstractPersistentLoggingFSM
public interface PersistentFSM<S extends PersistentFSM.FSMState,D,E> extends PersistentActor, PersistentFSMBase<S,D,E>, ActorLogging
Enables to pass a ClassTag of a domain event base type from the implementing class
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface akka.actor.Actor
Actor.emptyBehavior$, Actor.ignoringBehavior$
-
Nested classes/interfaces inherited from interface akka.persistence.Eventsourced
Eventsourced.AsyncHandlerInvocation, Eventsourced.AsyncHandlerInvocation$, Eventsourced.PendingHandlerInvocation, Eventsourced.RecoveryTick, Eventsourced.RecoveryTick$, Eventsourced.StashingHandlerInvocation, Eventsourced.StashingHandlerInvocation$
-
Nested classes/interfaces inherited from interface akka.persistence.fsm.PersistentFSMBase
PersistentFSMBase.TransformHelper
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
akka$persistence$fsm$PersistentFSM$_setter_$domainEventTag_$eq(scala.reflect.ClassTag<E> x$1)
Domain event'sClassTag
Used for identifying domain events during recoveryD
applyEvent(E domainEvent, D currentData)
Override this handler to define the action on Domain Eventvoid
applyState(PersistentFSM.State<S,D,E> nextState)
Persist FSM State and FSM State Datavoid
currentStateTimeout_$eq(scala.Option<scala.concurrent.duration.FiniteDuration> x$1)
scala.reflect.ClassTag<E>
domainEventClassTag()
Enables to pass a ClassTag of a domain event base type from the implementing classscala.reflect.ClassTag<E>
domainEventTag()
Domain event'sClassTag
Used for identifying domain events during recoveryvoid
onRecoveryCompleted()
Override this handler to define the action on recovery completionscala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit>
receiveCommand()
After recovery events are handled as in usual FSM actorscala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit>
receiveRecover()
Discover the latest recorded statevoid
saveStateSnapshot()
Save the current state as a snapshotscala.collection.immutable.Map<java.lang.String,S>
statesMap()
Map from state identifier to state instancevoid
super$applyState(PersistentFSM.State<S,D,E> nextState)
Persist FSM State and FSM State Data-
Methods inherited from interface akka.actor.Actor
akka$actor$Actor$_setter_$context_$eq, akka$actor$Actor$_setter_$self_$eq, context, postRestart, preStart, self, sender, supervisorStrategy
-
Methods inherited from interface akka.actor.ActorLogging
_log_$eq, log
-
Methods inherited from interface akka.persistence.Eventsourced
_lastSequenceNr_$eq, aroundPostRestart, aroundPostStop, aroundPreRestart, aroundPreStart, aroundReceive, batchAtomicWrite, changeState, currentState_$eq, deleteMessages, eventBatch_$eq, flushBatch, flushJournalBatch, internalDefer, internalDeferAsync, internalDeleteMessagesBeforeSnapshot, internalPersist, internalPersistAll, internalPersistAllAsync, internalPersistAsync, journal, journalBatch_$eq, lastSequenceNr, log, nextSequenceNr, onPersistFailure, onPersistRejected, onRecoveryFailure, onReplaySuccess, peekApplyHandler, pendingStashingPersistInvocations_$eq, recovering, recoveryFinished, recoveryRunning, recoveryStarted, requestRecoveryPermit, sendBatchedEventsToJournal, sequenceNr_$eq, setLastSequenceNr, snapshotSequenceNr, snapshotStore, snapshotterId, startRecovery, stash, stashInternally, super$aroundPostRestart, super$aroundPostStop, super$aroundPreRestart, super$aroundPreStart, super$aroundReceive, super$stash, super$unhandled, unhandled, unstashAll, unstashInternally, updateLastSequenceNr, waitingRecoveryPermit, writeEventFailed, writeEventRejected, writeEventSucceeded, writeInProgress_$eq
-
Methods inherited from interface akka.routing.Listeners
akka$routing$Listeners$_setter_$listeners_$eq, gossip, gossip$default$2, listenerManagement, listeners
-
Methods inherited from interface akka.persistence.PersistenceIdentity
journalPluginId, persistenceId, snapshotPluginId
-
Methods inherited from interface akka.persistence.PersistenceRecovery
recovery
-
Methods inherited from interface akka.persistence.PersistenceStash
internalStashOverflowStrategy
-
Methods inherited from interface akka.persistence.PersistentActor
defer, deferAsync, persist, persistAll, persistAllAsync, persistAsync, receive
-
Methods inherited from interface akka.persistence.fsm.PersistentFSMBase
$minus$greater, akka$persistence$fsm$PersistentFSMBase$_setter_$Event_$eq, akka$persistence$fsm$PersistentFSMBase$_setter_$StateTimeout_$eq, akka$persistence$fsm$PersistentFSMBase$_setter_$StopEvent_$eq, cancelTimer, currentState_$eq, debugEvent, Event, generation_$eq, handleEvent_$eq, handleTransition, initialize, isStateTimerActive, isTimerActive, logTermination, makeTransition, nextState_$eq, nextStateData, onTermination, onTransition, postStop, processEvent, processMsg, receive, register, setStateTimeout, setTimer, setTimer$default$4, startWith, startWith$default$3, stateData, stateName, stateNames, StateTimeout, stay, stop, stop, stop, StopEvent, super$postStop, terminate, terminateEvent_$eq, timeoutFuture_$eq, total2pf, transform, transitionEvent_$eq, when, when$default$2, whenUnhandled
-
Methods inherited from interface akka.persistence.Snapshotter
deleteSnapshot, deleteSnapshots, loadSnapshot, saveSnapshot
-
Methods inherited from interface akka.actor.StashFactory
createStash
-
Methods inherited from interface akka.actor.StashSupport
actorCell, akka$actor$StashSupport$_setter_$mailbox_$eq, clearStash, context, enqueueFirst, mailbox, prepend, self, theStash_$eq, unstash, unstashAll
-
Methods inherited from interface akka.actor.UnrestrictedStash
postStop, preRestart, super$postStop, super$preRestart
-
-
-
-
Method Detail
-
akka$persistence$fsm$PersistentFSM$_setter_$domainEventTag_$eq
void akka$persistence$fsm$PersistentFSM$_setter_$domainEventTag_$eq(scala.reflect.ClassTag<E> x$1)
Domain event'sClassTag
Used for identifying domain events during recovery- Parameters:
x$1
- (undocumented)
-
super$applyState
void super$applyState(PersistentFSM.State<S,D,E> nextState)
Persist FSM State and FSM State Data- Parameters:
nextState
- (undocumented)
-
domainEventClassTag
scala.reflect.ClassTag<E> domainEventClassTag()
Enables to pass a ClassTag of a domain event base type from the implementing class- Returns:
ClassTag
of domain event base type
-
domainEventTag
scala.reflect.ClassTag<E> domainEventTag()
Domain event'sClassTag
Used for identifying domain events during recovery- Returns:
- (undocumented)
-
statesMap
scala.collection.immutable.Map<java.lang.String,S> statesMap()
Map from state identifier to state instance- Returns:
- (undocumented)
-
currentStateTimeout_$eq
void currentStateTimeout_$eq(scala.Option<scala.concurrent.duration.FiniteDuration> x$1)
-
applyEvent
D applyEvent(E domainEvent, D currentData)
Override this handler to define the action on Domain Event- Parameters:
domainEvent
- domain event to applycurrentData
- state data of the previous state- Returns:
- updated state data
-
onRecoveryCompleted
void onRecoveryCompleted()
Override this handler to define the action on recovery completion
-
saveStateSnapshot
void saveStateSnapshot()
Save the current state as a snapshot
-
receiveCommand
scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> receiveCommand()
After recovery events are handled as in usual FSM actor- Specified by:
receiveCommand
in interfaceEventsourced
- Returns:
- (undocumented)
-
receiveRecover
scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> receiveRecover()
Discover the latest recorded state- Specified by:
receiveRecover
in interfaceEventsourced
- Returns:
- (undocumented)
- See Also:
Recovery
-
applyState
void applyState(PersistentFSM.State<S,D,E> nextState)
Persist FSM State and FSM State Data- Specified by:
applyState
in interfacePersistentFSMBase<S extends PersistentFSM.FSMState,D,E>
- Parameters:
nextState
- (undocumented)
-
-