PersistentFSM

org.apache.pekko.persistence.fsm.PersistentFSM
See thePersistentFSM companion trait
object PersistentFSM

Attributes

Companion
trait
Deprecated
true
Source
PersistentFSM.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

object ->

This extractor is just convenience for matching a (S, S) pair, including a reminder what the new state is.

This extractor is just convenience for matching a (S, S) pair, including a reminder what the new state is.

Attributes

Source
PersistentFSM.scala
Supertypes
class Object
trait Matchable
class Any
Self type
->.type
final case class CurrentState[S](fsmRef: ActorRef, state: S, timeout: Option[FiniteDuration])

Message type which is sent directly to the subscribed actor in pekko.actor.FSM.SubscribeTransitionCallBack before sending any pekko.actor.FSM.Transition messages.

Message type which is sent directly to the subscribed actor in pekko.actor.FSM.SubscribeTransitionCallBack before sending any pekko.actor.FSM.Transition messages.

Attributes

Source
PersistentFSM.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class Event[D](event: Any, stateData: D) extends NoSerializationVerificationNeeded

All messages sent to the pekko.actor.FSM will be wrapped inside an Event, which allows pattern matching to extract both state and data.

All messages sent to the pekko.actor.FSM will be wrapped inside an Event, which allows pattern matching to extract both state and data.

Attributes

Source
PersistentFSM.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
trait FSMState

FSMState base trait, makes possible for simple default serialization by conversion to String

FSMState base trait, makes possible for simple default serialization by conversion to String

Attributes

Source
PersistentFSM.scala
Supertypes
class Object
trait Matchable
class Any
final case class Failure(cause: Any) extends Reason

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.

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.

Attributes

Source
PersistentFSM.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Reason
class Object
trait Matchable
class Any
Show all
final case class LogEntry[S, D](stateName: S, stateData: D, event: Any)

Log Entry of the pekko.actor.LoggingFSM, can be obtained by calling getLog.

Log Entry of the pekko.actor.LoggingFSM, can be obtained by calling getLog.

Attributes

Source
PersistentFSM.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case object Normal extends Reason

Default reason if calling stop().

Default reason if calling stop().

Attributes

Source
PersistentFSM.scala
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Reason
class Object
trait Matchable
class Any
Show all
Self type
Normal.type
object NullFunction extends PartialFunction[Any, Nothing]

A partial function value which does not match anything and can be used to “reset” whenUnhandled and onTermination handlers.

A partial function value which does not match anything and can be used to “reset” whenUnhandled and onTermination handlers.

onTermination(FSM.NullFunction)

Attributes

Source
PersistentFSM.scala
Supertypes
trait PartialFunction[Any, Nothing]
trait Any => Nothing
class Object
trait Matchable
class Any
Self type
sealed trait Reason

Reason why this pekko.actor.FSM is shutting down.

Reason why this pekko.actor.FSM is shutting down.

Attributes

Source
PersistentFSM.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Failure
object Normal
object Shutdown
case object Shutdown extends Reason

Reason given when someone was calling system.stop(fsm) from outside; also applies to Stop supervision directive.

Reason given when someone was calling system.stop(fsm) from outside; also applies to Stop supervision directive.

Attributes

Source
PersistentFSM.scala
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Reason
class Object
trait Matchable
class Any
Show all
Self type
Shutdown.type
final case class State[S, D, E](stateName: S, stateData: D, timeout: Option[FiniteDuration], stopReason: Option[Reason], replies: List[Any], domainEvents: Seq[E], afterTransitionDo: D => Unit)(notifies: Boolean)

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)

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)

Attributes

Source
PersistentFSM.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class StateChangeEvent(stateIdentifier: String, timeout: Option[FiniteDuration])

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

Value parameters

stateIdentifier

FSM state identifier

timeout

FSM state timeout

Attributes

Source
PersistentFSM.scala
Supertypes
trait Product
trait Equals
trait Message
trait Serializable
class Object
trait Matchable
class Any
Show all
case object StateTimeout

This case object is received in case of a state timeout.

This case object is received in case of a state timeout.

Attributes

Source
PersistentFSM.scala
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
final case class StopEvent[S, D](reason: Reason, currentState: S, stateData: D) extends NoSerializationVerificationNeeded

Case class representing the state of the pekko.actor.FSM whithin the onTermination block.

Case class representing the state of the pekko.actor.FSM whithin the onTermination block.

Attributes

Source
PersistentFSM.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class SubscribeTransitionCallBack(actorRef: ActorRef)

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.

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.

Attributes

Source
PersistentFSM.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class Transition[S](fsmRef: ActorRef, from: S, to: S, timeout: Option[FiniteDuration])

Message type which is used to communicate transitions between states to all subscribed listeners (use pekko.actor.FSM.SubscribeTransitionCallBack).

Message type which is used to communicate transitions between states to all subscribed listeners (use pekko.actor.FSM.SubscribeTransitionCallBack).

Attributes

Source
PersistentFSM.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class UnsubscribeTransitionCallBack(actorRef: ActorRef)

Unsubscribe from pekko.actor.FSM.Transition notifications which was effected by sending the corresponding pekko.actor.FSM.SubscribeTransitionCallBack.

Unsubscribe from pekko.actor.FSM.Transition notifications which was effected by sending the corresponding pekko.actor.FSM.SubscribeTransitionCallBack.

Attributes

Source
PersistentFSM.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Value members

Concrete fields

val : ->.type

Attributes

Source
PersistentFSM.scala