Packages

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 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
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. State
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new State(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)

Value Members

  1. val afterTransitionDo: (D) ⇒ Unit
  2. def andThen(handler: (D) ⇒ Unit): State[S, D, E]

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

  3. 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.

    Annotations
    @varargs()
  4. val domainEvents: Seq[E]
  5. def forMax(timeout: Duration): State[S, D, E]

    Java API: Modify state transition descriptor to include a state timeout 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.

  6. def forMax(timeout: Duration): State[S, D, E]

    Modify state transition descriptor to include a state timeout 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.

  7. val replies: List[Any]
  8. 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

  9. val stateData: D
  10. val stateName: S
  11. val stopReason: Option[Reason]
  12. val timeout: Option[FiniteDuration]