object PersistentFSM
- Annotations
- @deprecated
- Deprecated
(Since version Akka 2.6.0) Use EventSourcedBehavior
- Source
- PersistentFSM.scala
- Alphabetic
- By Inheritance
- PersistentFSM
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- final case class CurrentState[S](fsmRef: ActorRef, state: S, timeout: Option[FiniteDuration]) extends Product with Serializable
Message type which is sent directly to the subscribed actor in pekko.actor.FSM.SubscribeTransitionCallBack before sending any pekko.actor.FSM.Transition messages.
- final case class Event[D](event: Any, stateData: D) extends NoSerializationVerificationNeeded with Product with Serializable
All messages sent to the pekko.actor.FSM will be wrapped inside an
Event
, which allows pattern matching to extract both state and data. - trait FSMState extends AnyRef
FSMState base trait, makes possible for simple default serialization by conversion to String
- final case class Failure(cause: Any) extends Reason with Product with Serializable
Signifies that the pekko.actor.FSM is shutting itself down because of an error, e.g.
Signifies that the pekko.actor.FSM is shutting itself down because of an error, e.g. if the state to transition into does not exist. You can use this to communicate a more precise cause to the
onTermination
block. - final case class LogEntry[S, D](stateName: S, stateData: D, event: Any) extends Product with Serializable
Log Entry of the pekko.actor.LoggingFSM, can be obtained by calling
getLog
. - sealed trait Reason extends AnyRef
Reason why this pekko.actor.FSM is shutting down.
- final case class State[S, D, E](stateName: S, stateData: D, timeout: Option[FiniteDuration] = None, stopReason: Option[Reason] = None, replies: List[Any] = Nil, domainEvents: Seq[E] = Nil, afterTransitionDo: (D) => Unit = (_: D) =>)(notifies: Boolean = true) extends Product with Serializable
This captures all of the managed state of the pekko.actor.FSM: the state name, the state data, possibly custom timeout, stop reason, replies accumulated while processing the last message, possibly domain event and handler to be executed after FSM moves to the new state (also triggered when staying in the same state)
- case class StateChangeEvent(stateIdentifier: String, timeout: Option[FiniteDuration]) extends PersistentFsmEvent with Product with Serializable
Persisted on state change Not deprecated as used for users migrating from PersistentFSM to EventSourcedBehavior
Persisted on state change Not deprecated as used for users migrating from PersistentFSM to EventSourcedBehavior
- stateIdentifier
FSM state identifier
- timeout
FSM state timeout
- final case class StopEvent[S, D](reason: Reason, currentState: S, stateData: D) extends NoSerializationVerificationNeeded with Product with Serializable
Case class representing the state of the pekko.actor.FSM whithin the
onTermination
block. - final case class SubscribeTransitionCallBack(actorRef: ActorRef) extends Product with Serializable
Send this to an pekko.actor.FSM to request first the PersistentFSM.CurrentState and then a series of PersistentFSM.Transition updates.
Send this to an pekko.actor.FSM to request first the PersistentFSM.CurrentState and then a series of PersistentFSM.Transition updates. Cancel the subscription using PersistentFSM.UnsubscribeTransitionCallBack.
- final case class Transition[S](fsmRef: ActorRef, from: S, to: S, timeout: Option[FiniteDuration]) extends Product with Serializable
Message type which is used to communicate transitions between states to all subscribed listeners (use pekko.actor.FSM.SubscribeTransitionCallBack).
- final case class UnsubscribeTransitionCallBack(actorRef: ActorRef) extends Product with Serializable
Unsubscribe from pekko.actor.FSM.Transition notifications which was effected by sending the corresponding pekko.actor.FSM.SubscribeTransitionCallBack.
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- val →: ->.type
- object ->
This extractor is just convenience for matching a (S, S) pair, including a reminder what the new state is.
- case object Normal extends Reason with Product with Serializable
Default reason if calling
stop()
. - object NullFunction extends PartialFunction[Any, Nothing]
A partial function value which does not match anything and can be used to “reset”
whenUnhandled
andonTermination
handlers.A partial function value which does not match anything and can be used to “reset”
whenUnhandled
andonTermination
handlers.onTermination(FSM.NullFunction)
- case object Shutdown extends Reason with Product with Serializable
Reason given when someone was calling
system.stop(fsm)
from outside; also applies toStop
supervision directive. - case object StateTimeout extends Product with Serializable
This case object is received in case of a state timeout.