Class FSMBase.State<TS, TD>
This captures all of the managed state of the FSM<TState, TData>: the state name, the state data, possibly custom timeout, stop reason, and replies accumulated while processing the last message.
Implements
Inherited Members
Namespace: Akka.Actor
Assembly: Akka.dll
Syntax
public sealed class State<TS, TD> : IEquatable<FSMBase.State<TS, TD>>
Type Parameters
Name | Description |
---|---|
TS | The name of the state |
TD | The data of the state |
Constructors
| Improve this Doc View SourceState(TS, TD, Nullable<TimeSpan>, FSMBase.Reason, IReadOnlyList<Object>, Boolean)
Initializes a new instance of the State
Declaration
public State(TS stateName, TD stateData, TimeSpan? timeout = null, FSMBase.Reason stopReason = null, IReadOnlyList<object> replies = null, bool notifies = true)
Parameters
Type | Name | Description |
---|---|---|
TS | stateName | TBD |
TD | stateData | TBD |
Nullable<TimeSpan> | timeout | TBD |
FSMBase.Reason | stopReason | TBD |
IReadOnlyList<Object> | replies | TBD |
Boolean | notifies | TBD |
Properties
| Improve this Doc View SourceReplies
Optional - the set of replies to send to subscribers.
Declaration
public IReadOnlyList<object> Replies { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<Object> |
StateData
The data belonging to this sate
Declaration
public TD StateData { get; }
Property Value
Type | Description |
---|---|
TD |
StateName
The name of this state
Declaration
public TS StateName { get; }
Property Value
Type | Description |
---|---|
TS |
StopReason
Optional - the reason why we're stopping.
Declaration
public FSMBase.Reason StopReason { get; }
Property Value
Type | Description |
---|---|
FSMBase.Reason |
Timeout
Optional. The state timeout.
Declaration
public TimeSpan? Timeout { get; }
Property Value
Type | Description |
---|---|
Nullable<TimeSpan> |
Methods
| Improve this Doc View SourceEquals(FSMBase.State<TS, TD>)
Declaration
public bool Equals(FSMBase.State<TS, TD> other)
Parameters
Type | Name | Description |
---|---|---|
FSMBase.State<TS, TD> | other |
Returns
Type | Description |
---|---|
Boolean |
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj |
Returns
Type | Description |
---|---|
Boolean |
Overrides
| Improve this Doc View SourceForMax(TimeSpan)
Modify the state transition descriptor to include a state timeout for the
next state. This timeout overrides any default timeout set for the next state.
Declaration
public FSMBase.State<TS, TD> ForMax(TimeSpan timeout)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | timeout | TBD |
Returns
Type | Description |
---|---|
FSMBase.State<TS, TD> | TBD |
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 |
Overrides
| Improve this Doc View SourceReplying(Object)
Send reply to sender of the current message, if available.
Declaration
public FSMBase.State<TS, TD> Replying(object replyValue)
Parameters
Type | Name | Description |
---|---|---|
Object | replyValue | TBD |
Returns
Type | Description |
---|---|
FSMBase.State<TS, TD> | TBD |
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String |
Overrides
| Improve this Doc View SourceUsing(TD)
Modify state transition descriptor with new state data. The data will be set when transitioning to the new state.
Declaration
public FSMBase.State<TS, TD> Using(TD nextStateData)
Parameters
Type | Name | Description |
---|---|---|
TD | nextStateData | TBD |
Returns
Type | Description |
---|---|
FSMBase.State<TS, TD> | TBD |