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
Deprecated.
Use EventSourcedBehavior. Since Akka 2.6.0.
A FSM implementation with persistent state.

Supports the usual pekko.actor.FSM functionality with additional persistence features. PersistentFSM is identified by 'persistenceId' value. State changes are persisted atomically together with domain events, which means that either both succeed or both fail, i.e. a state transition event will not be stored if persistence of an event related to that change fails. Persistence execution order is: persist -&gt; wait for ack -&gt; apply state. Incoming messages are deferred until the state is applied. State Data is constructed based on domain events, according to user's implementation of applyEvent function.

  • Method Details

    • org$apache$pekko$persistence$fsm$PersistentFSM$_setter_$domainEventTag_$eq

      void org$apache$pekko$persistence$fsm$PersistentFSM$_setter_$domainEventTag_$eq(scala.reflect.ClassTag<E> x$1)
      Deprecated.
      Domain event's ClassTag Used for identifying domain events during recovery
    • super$applyState

      void super$applyState(PersistentFSM.State<S,D,E> nextState)
      Deprecated.
      Persist FSM State and FSM State Data
    • domainEventClassTag

      scala.reflect.ClassTag<E> domainEventClassTag()
      Deprecated.
      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()
      Deprecated.
      Domain event's ClassTag Used for identifying domain events during recovery
    • statesMap

      scala.collection.immutable.Map<String,S> statesMap()
      Deprecated.
      Map from state identifier to state instance
    • currentStateTimeout_$eq

      void currentStateTimeout_$eq(scala.Option<scala.concurrent.duration.FiniteDuration> x$1)
      Deprecated.
    • applyEvent

      D applyEvent(E domainEvent, D currentData)
      Deprecated.
      Override this handler to define the action on Domain Event

      Parameters:
      domainEvent - domain event to apply
      currentData - state data of the previous state
      Returns:
      updated state data
    • onRecoveryCompleted

      void onRecoveryCompleted()
      Deprecated.
      Override this handler to define the action on recovery completion
    • saveStateSnapshot

      void saveStateSnapshot()
      Deprecated.
      Save the current state as a snapshot
    • receiveCommand

      scala.PartialFunction<Object,scala.runtime.BoxedUnit> receiveCommand()
      Deprecated.
      After recovery events are handled as in usual FSM actor
      Specified by:
      receiveCommand in interface Eventsourced
    • receiveRecover

      scala.PartialFunction<Object,scala.runtime.BoxedUnit> receiveRecover()
      Deprecated.
      Discover the latest recorded state
      Specified by:
      receiveRecover in interface Eventsourced
      See Also:
      • pekko.persistence.Recovery
    • applyState

      void applyState(PersistentFSM.State<S,D,E> nextState)
      Deprecated.
      Persist FSM State and FSM State Data
      Specified by:
      applyState in interface PersistentFSMBase<S extends PersistentFSM.FSMState,D,E>