Package akka.persistence.fsm
Class PersistentFSM.State<S,D,E>
- java.lang.Object
-
- akka.persistence.fsm.PersistentFSM.State<S,D,E>
-
- All Implemented Interfaces:
java.io.Serializable
,scala.Equals
,scala.Product
,scala.Serializable
- Enclosing interface:
- PersistentFSM<S extends PersistentFSM.FSMState,D,E>
public static final class PersistentFSM.State<S,D,E> extends java.lang.Object implements scala.Product, scala.Serializable
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description State(S stateName, D stateData, scala.Option<scala.concurrent.duration.FiniteDuration> timeout, scala.Option<PersistentFSM.Reason> stopReason, scala.collection.immutable.List<java.lang.Object> replies, scala.collection.Seq<E> domainEvents, scala.Function1<D,scala.runtime.BoxedUnit> afterTransitionDo, boolean notifies)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description scala.Function1<D,scala.runtime.BoxedUnit>
afterTransitionDo()
PersistentFSM.State<S,D,E>
andThen(scala.Function1<D,scala.runtime.BoxedUnit> handler)
Register a handler to be triggered after the state has been persisted successfullyPersistentFSM.State<S,D,E>
applying(java.lang.Object... events)
Specify domain events to be applied when transitioning to the new state.PersistentFSM.State<S,D,E>
applying(scala.collection.Seq<E> events)
Specify domain events to be applied when transitioning to the new state.boolean
canEqual(java.lang.Object x$1)
PersistentFSM.State<S,D,E>
copy(S stateName, D stateData, scala.Option<scala.concurrent.duration.FiniteDuration> timeout, scala.Option<PersistentFSM.Reason> stopReason, scala.collection.immutable.List<java.lang.Object> replies, boolean notifies, scala.collection.Seq<E> domainEvents, scala.Function1<D,scala.runtime.BoxedUnit> afterTransitionDo)
S
copy$default$1()
D
copy$default$2()
scala.Option<scala.concurrent.duration.FiniteDuration>
copy$default$3()
scala.Option<PersistentFSM.Reason>
copy$default$4()
scala.collection.immutable.List<java.lang.Object>
copy$default$5()
boolean
copy$default$6()
scala.collection.Seq<E>
copy$default$7()
scala.Function1<D,scala.runtime.BoxedUnit>
copy$default$8()
scala.collection.Seq<E>
domainEvents()
boolean
equals(java.lang.Object x$1)
PersistentFSM.State<S,D,E>
forMax(java.time.Duration timeout)
Java API: Modify state transition descriptor to include a state timeout for the next state.PersistentFSM.State<S,D,E>
forMax(scala.concurrent.duration.Duration timeout)
Modify state transition descriptor to include a state timeout for the next state.int
hashCode()
boolean
notifies()
int
productArity()
java.lang.Object
productElement(int x$1)
scala.collection.Iterator<java.lang.Object>
productIterator()
java.lang.String
productPrefix()
scala.collection.immutable.List<java.lang.Object>
replies()
PersistentFSM.State<S,D,E>
replying(java.lang.Object replyValue)
Send reply to sender of the current message, if available.D
stateData()
S
stateName()
scala.Option<PersistentFSM.Reason>
stopReason()
scala.Option<scala.concurrent.duration.FiniteDuration>
timeout()
java.lang.String
toString()
PersistentFSM.State<S,D,E>
using(D nextStateData)
Deprecated.Internal API easily to be confused with regular FSM's using.PersistentFSM.State<S,D,E>
withNotification(boolean notifies)
PersistentFSM.State<S,D,E>
withStopReason(PersistentFSM.Reason reason)
INTERNAL API.
-
-
-
Constructor Detail
-
State
public State(S stateName, D stateData, scala.Option<scala.concurrent.duration.FiniteDuration> timeout, scala.Option<PersistentFSM.Reason> stopReason, scala.collection.immutable.List<java.lang.Object> replies, scala.collection.Seq<E> domainEvents, scala.Function1<D,scala.runtime.BoxedUnit> afterTransitionDo, boolean notifies)
-
-
Method Detail
-
applying
public PersistentFSM.State<S,D,E> applying(java.lang.Object... events)
Specify domain events to be applied when transitioning to the new state.- Parameters:
events
- (undocumented)- Returns:
- (undocumented)
-
stateName
public S stateName()
-
stateData
public D stateData()
-
timeout
public scala.Option<scala.concurrent.duration.FiniteDuration> timeout()
-
stopReason
public scala.Option<PersistentFSM.Reason> stopReason()
-
replies
public scala.collection.immutable.List<java.lang.Object> replies()
-
domainEvents
public scala.collection.Seq<E> domainEvents()
-
afterTransitionDo
public scala.Function1<D,scala.runtime.BoxedUnit> afterTransitionDo()
-
notifies
public boolean notifies()
-
copy
public PersistentFSM.State<S,D,E> copy(S stateName, D stateData, scala.Option<scala.concurrent.duration.FiniteDuration> timeout, scala.Option<PersistentFSM.Reason> stopReason, scala.collection.immutable.List<java.lang.Object> replies, boolean notifies, scala.collection.Seq<E> domainEvents, scala.Function1<D,scala.runtime.BoxedUnit> afterTransitionDo)
-
copy$default$1
public S copy$default$1()
-
copy$default$2
public D copy$default$2()
-
copy$default$3
public scala.Option<scala.concurrent.duration.FiniteDuration> copy$default$3()
-
copy$default$4
public scala.Option<PersistentFSM.Reason> copy$default$4()
-
copy$default$5
public scala.collection.immutable.List<java.lang.Object> copy$default$5()
-
copy$default$6
public boolean copy$default$6()
-
copy$default$7
public scala.collection.Seq<E> copy$default$7()
-
copy$default$8
public scala.Function1<D,scala.runtime.BoxedUnit> copy$default$8()
-
forMax
public PersistentFSM.State<S,D,E> forMax(scala.concurrent.duration.Duration timeout)
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.
- Parameters:
timeout
- (undocumented)- Returns:
- (undocumented)
-
forMax
public PersistentFSM.State<S,D,E> forMax(java.time.Duration timeout)
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.
- Parameters:
timeout
- (undocumented)- Returns:
- (undocumented)
-
replying
public PersistentFSM.State<S,D,E> replying(java.lang.Object replyValue)
Send reply to sender of the current message, if available.- Parameters:
replyValue
- (undocumented)- Returns:
- this state transition descriptor
-
using
public PersistentFSM.State<S,D,E> using(D nextStateData)
Deprecated.Internal API easily to be confused with regular FSM's using. Use regular events (`applying`). Internally, `copy` can be used instead. Since 2.5.5.
-
withStopReason
public PersistentFSM.State<S,D,E> withStopReason(PersistentFSM.Reason reason)
INTERNAL API.- Parameters:
reason
- (undocumented)- Returns:
- (undocumented)
-
withNotification
public PersistentFSM.State<S,D,E> withNotification(boolean notifies)
-
applying
public PersistentFSM.State<S,D,E> applying(scala.collection.Seq<E> events)
Specify domain events to be applied when transitioning to the new state.- Parameters:
events
- (undocumented)- Returns:
- (undocumented)
-
andThen
public PersistentFSM.State<S,D,E> andThen(scala.Function1<D,scala.runtime.BoxedUnit> handler)
Register a handler to be triggered after the state has been persisted successfully- Parameters:
handler
- (undocumented)- Returns:
- (undocumented)
-
productPrefix
public java.lang.String productPrefix()
- Specified by:
productPrefix
in interfacescala.Product
-
productArity
public int productArity()
- Specified by:
productArity
in interfacescala.Product
-
productElement
public java.lang.Object productElement(int x$1)
- Specified by:
productElement
in interfacescala.Product
-
productIterator
public scala.collection.Iterator<java.lang.Object> productIterator()
- Specified by:
productIterator
in interfacescala.Product
-
canEqual
public boolean canEqual(java.lang.Object x$1)
- Specified by:
canEqual
in interfacescala.Equals
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object x$1)
- Specified by:
equals
in interfacescala.Equals
- Overrides:
equals
in classjava.lang.Object
-
-