State

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 akka.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)

Source:
PersistentFSM.scala
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

Value members

Concrete methods

def andThen(handler: D => Unit): State[S, D, E]

Register a handler to be triggered after the state has been persisted successfully

Register a handler to be triggered after the state has been persisted successfully

Source:
PersistentFSM.scala
def applying(events: E*): State[S, D, E]

Specify domain events to be applied when transitioning to the new state.

Specify domain events to be applied when transitioning to the new state.

Source:
PersistentFSM.scala
def forMax(timeout: Duration): State[S, D, E]

Modify state transition descriptor to include a state timeout for the next state. This timeout overrides any default timeout set for the next state.

Modify state transition descriptor to include a state timeout for the next state. This timeout overrides any default timeout set for the next state.

Use Duration.Inf to deactivate an existing timeout.

Source:
PersistentFSM.scala
def forMax(timeout: Duration): State[S, D, E]

Java API: Modify state transition descriptor to include a state timeout for the next state. This timeout overrides any default timeout set for the next state.

Java API: Modify state transition descriptor to include a state timeout for the next state. This timeout overrides any default timeout set for the next state.

Use Duration.Inf to deactivate an existing timeout.

Source:
PersistentFSM.scala
def replying(replyValue: Any): State[S, D, E]

Send reply to sender of the current message, if available.

Send reply to sender of the current message, if available.

Returns:

this state transition descriptor

Source:
PersistentFSM.scala

Inherited methods

Inherited from:
Product