Interface IAppStateMachineService
Build-in distributed finite state machine service.
public interface IAppStateMachineService
Methods
CompleteAsync<T>(Guid, IEnumerable<T>, T, object, CancellationToken, GlowAppScope, AppDataSerializer)
Request to change State-Machine's state to Completed.
IAppStateMachineService.IAppStateMachineSetStateBuilder<T> CompleteAsync<T>(Guid fsmId, IEnumerable<T> fromStates, T toState, object data, CancellationToken cancellationToken, GlowAppScope scope = GlowAppScope.Service, AppDataSerializer serializer = AppDataSerializer.Json) where T : struct, Enum
Parameters
fsmIdGuidThe FSM Id
fromStatesIEnumerable<T>The states that FSM must be to accept the new state request.
toStateTThe state to set the FSM
dataobjectThe state data to use for state change
cancellationTokenCancellationTokenCancel operation
scopeGlowAppScopeThe scope of the state machine.
- QuantumSpace scope means the state machine is shared with other services in the same QuantumSpace.
- Service scope means this state machine is only visible to other instances of the same service.
serializerAppDataSerializerSerialize to use for data
Returns
Type Parameters
T
CompleteAsync<T>(Guid, IEnumerable<T>, T, CancellationToken, GlowAppScope)
Request to change State-Machine's state to Completed.
IAppStateMachineService.IAppStateMachineSetStateBuilder<T> CompleteAsync<T>(Guid fsmId, IEnumerable<T> fromStates, T toState, CancellationToken cancellationToken, GlowAppScope scope = GlowAppScope.Service) where T : struct, Enum
Parameters
fsmIdGuidThe FSM Id
fromStatesIEnumerable<T>The states that FSM must be to accept the new state request.
toStateTThe state to set the FSM
cancellationTokenCancellationTokenCancel operation
scopeGlowAppScopeThe scope of the state machine.
- QuantumSpace scope means the state machine is shared with other services in the same QuantumSpace.
- Service scope means this state machine is only visible to other instances of the same service.
Returns
Type Parameters
T
CompleteAsync<T>(Guid, T, object, CancellationToken, GlowAppScope, AppDataSerializer)
Request to change State-Machine's state to Completed.
IAppStateMachineService.IAppStateMachineSetStateBuilder<T> CompleteAsync<T>(Guid fsmId, T state, object data, CancellationToken cancellationToken, GlowAppScope scope = GlowAppScope.Service, AppDataSerializer serializer = AppDataSerializer.Json) where T : struct, Enum
Parameters
fsmIdGuidThe FSM Id
stateTThe state to set the FSM
dataobjectThe state data to use for state change
cancellationTokenCancellationTokenCancel operation
scopeGlowAppScopeThe scope of the state machine.
- QuantumSpace scope means the state machine is shared with other services in the same QuantumSpace.
- Service scope means this state machine is only visible to other instances of the same service.
serializerAppDataSerializerSerialize to use for data
Returns
Type Parameters
T
CompleteAsync<T>(Guid, T, CancellationToken, GlowAppScope)
Request to change State-Machine's state to Completed.
IAppStateMachineService.IAppStateMachineSetStateBuilder<T> CompleteAsync<T>(Guid fsmId, T state, CancellationToken cancellationToken, GlowAppScope scope = GlowAppScope.Service) where T : struct, Enum
Parameters
fsmIdGuidThe FSM Id
stateTThe state to set the FSM
cancellationTokenCancellationTokenCancel operation
scopeGlowAppScopeThe scope of the state machine.
- QuantumSpace scope means the state machine is shared with other services in the same QuantumSpace.
- Service scope means this state machine is only visible to other instances of the same service.
Returns
Type Parameters
T
CompleteAsync<T>(Guid, T, T, object, CancellationToken, GlowAppScope, AppDataSerializer)
Request to change State-Machine's state to Completed.
IAppStateMachineService.IAppStateMachineSetStateBuilder<T> CompleteAsync<T>(Guid fsmId, T fromState, T toState, object data, CancellationToken cancellationToken, GlowAppScope scope = GlowAppScope.Service, AppDataSerializer serializer = AppDataSerializer.Json) where T : struct, Enum
Parameters
fsmIdGuidThe FSM Id
fromStateTThe state that FSM must be to accept the new state request.
toStateTThe state to set the FSM
dataobjectThe state data to use for state change
cancellationTokenCancellationTokenCancel operation
scopeGlowAppScopeThe scope of the state machine.
- QuantumSpace scope means the state machine is shared with other services in the same QuantumSpace.
- Service scope means this state machine is only visible to other instances of the same service.
serializerAppDataSerializerSerialize to use for data
Returns
Type Parameters
T
CompleteAsync<T>(Guid, T, T, CancellationToken, GlowAppScope)
Request to change State-Machine's state to Completed.
IAppStateMachineService.IAppStateMachineSetStateBuilder<T> CompleteAsync<T>(Guid fsmId, T fromState, T toState, CancellationToken cancellationToken, GlowAppScope scope = GlowAppScope.Service) where T : struct, Enum
Parameters
fsmIdGuidThe FSM Id
fromStateTThe state that FSM must be to accept the new state request.
toStateTThe state to set the FSM
cancellationTokenCancellationTokenCancel operation
scopeGlowAppScopeThe scope of the state machine.
- QuantumSpace scope means the state machine is shared with other services in the same QuantumSpace.
- Service scope means this state machine is only visible to other instances of the same service.
Returns
Type Parameters
T
CreateAsync<T>(T, object, CancellationToken, GlowAppScope, AppDataSerializer)
Create a new state machine
IAppStateMachineService.IAppStateMachineCreateBuilder CreateAsync<T>(T initState, object initStateData, CancellationToken cancellationToken, GlowAppScope scope = GlowAppScope.Service, AppDataSerializer serializer = AppDataSerializer.Json) where T : struct, Enum
Parameters
initStateTThe state to initialize the new machine
initStateDataobjectThe state data to initialize the new machine
cancellationTokenCancellationTokenCancel operation
scopeGlowAppScopeThe scope of the state machine.
- QuantumSpace scope means the state machine is shared with other services in the same QuantumSpace.
- Service scope means this state machine is only visible to other instances of the same service.
serializerAppDataSerializerSerialize to use for data
Returns
Type Parameters
T
CreateAsync<T>(T, CancellationToken, GlowAppScope)
Create a new state machine
IAppStateMachineService.IAppStateMachineCreateBuilder CreateAsync<T>(T initState, CancellationToken cancellationToken, GlowAppScope scope = GlowAppScope.Service) where T : struct, Enum
Parameters
initStateTThe state to initialize the new machine
cancellationTokenCancellationTokenCancel operation
scopeGlowAppScopeThe scope of the state machine.
- QuantumSpace scope means the state machine is shared with other services in the same QuantumSpace.
- Service scope means this state machine is only visible to other instances of the same service.
Returns
Type Parameters
T
ManageBucket(string, GlowAppScope)
Manage bucket
IAppStateMachineService.IAppStateMachineBucketManagment ManageBucket(string bucket, GlowAppScope scope = GlowAppScope.Service)
Parameters
bucketstringThe bucket name
scopeGlowAppScopeThe scope of the bucket.
- QuantumSpace scope means the bucket is shared with other services in the same QuantumSpace.
- Service scope means this bucket is only visible to other instances of the same service.
Returns
ManageBucket(Type, GlowAppScope)
Manage bucket
IAppStateMachineService.IAppStateMachineBucketManagment ManageBucket(Type fsmType, GlowAppScope scope = GlowAppScope.Service)
Parameters
fsmTypeTypeThe state-machine type to manage
scopeGlowAppScopeThe scope of the bucket.
- QuantumSpace scope means the bucket is shared with other services in the same QuantumSpace.
- Service scope means this bucket is only visible to other instances of the same service.
Returns
ManageBucket<TStateMachineType>(GlowAppScope)
Manage bucket
IAppStateMachineService.IAppStateMachineBucketManagment ManageBucket<TStateMachineType>(GlowAppScope scope = GlowAppScope.Service)
Parameters
scopeGlowAppScopeThe scope of the bucket.
- QuantumSpace scope means the bucket is shared with other services in the same QuantumSpace.
- Service scope means this bucket is only visible to other instances of the same service.
Returns
Type Parameters
TStateMachineType
ManageStateMachine<T>(Guid, GlowAppScope)
Manage a state-machine
IAppStateMachineService.IAppStateMachineManagment<T> ManageStateMachine<T>(Guid fsmId, GlowAppScope scope = GlowAppScope.Service) where T : struct, Enum
Parameters
fsmIdGuidThe state-machine to manage
scopeGlowAppScopeThe scope of the bucket.
- QuantumSpace scope means the bucket is shared with other services in the same QuantumSpace.
- Service scope means this bucket is only visible to other instances of the same service.
Returns
Type Parameters
T
SetStateAsync<T>(Guid, IEnumerable<T>, T, object, CancellationToken, GlowAppScope, AppDataSerializer)
Change State-Machine's state.
IAppStateMachineService.IAppStateMachineSetStateBuilder<T> SetStateAsync<T>(Guid fsmId, IEnumerable<T> fromStates, T toState, object data, CancellationToken cancellationToken, GlowAppScope scope = GlowAppScope.Service, AppDataSerializer serializer = AppDataSerializer.Json) where T : struct, Enum
Parameters
fsmIdGuidThe FSM Id
fromStatesIEnumerable<T>The states that FSM must be to accept the new state request.
toStateTThe state to set the FSM
dataobjectThe state data to use for state change
cancellationTokenCancellationTokenCancel operation
scopeGlowAppScopeThe scope of the state machine.
- QuantumSpace scope means the state machine is shared with other services in the same QuantumSpace.
- Service scope means this state machine is only visible to other instances of the same service.
serializerAppDataSerializerSerialize to use for data
Returns
Type Parameters
T
SetStateAsync<T>(Guid, IEnumerable<T>, T, CancellationToken, GlowAppScope)
Change State-Machine's state.
IAppStateMachineService.IAppStateMachineSetStateBuilder<T> SetStateAsync<T>(Guid fsmId, IEnumerable<T> fromStates, T toState, CancellationToken cancellationToken, GlowAppScope scope = GlowAppScope.Service) where T : struct, Enum
Parameters
fsmIdGuidThe FSM Id
fromStatesIEnumerable<T>The states that FSM must be to accept the new state request.
toStateTThe state to set the FSM
cancellationTokenCancellationTokenCancel operation
scopeGlowAppScopeThe scope of the state machine.
- QuantumSpace scope means the state machine is shared with other services in the same QuantumSpace.
- Service scope means this state machine is only visible to other instances of the same service.
Returns
Type Parameters
T
SetStateAsync<T>(Guid, T, object, CancellationToken, GlowAppScope, AppDataSerializer)
Change State-Machine's state.
IAppStateMachineService.IAppStateMachineSetStateBuilder<T> SetStateAsync<T>(Guid fsmId, T state, object data, CancellationToken cancellationToken, GlowAppScope scope = GlowAppScope.Service, AppDataSerializer serializer = AppDataSerializer.Json) where T : struct, Enum
Parameters
fsmIdGuidThe FSM Id
stateTThe state to set the FSM
dataobjectThe state data to use for state change
cancellationTokenCancellationTokenCancel operation
scopeGlowAppScopeThe scope of the state machine.
- QuantumSpace scope means the state machine is shared with other services in the same QuantumSpace.
- Service scope means this state machine is only visible to other instances of the same service.
serializerAppDataSerializerSerialize to use for data
Returns
Type Parameters
T
SetStateAsync<T>(Guid, T, CancellationToken, GlowAppScope)
Change State-Machine's state.
IAppStateMachineService.IAppStateMachineSetStateBuilder<T> SetStateAsync<T>(Guid fsmId, T state, CancellationToken cancellationToken, GlowAppScope scope = GlowAppScope.Service) where T : struct, Enum
Parameters
fsmIdGuidThe FSM Id
stateTThe state to set the FSM
cancellationTokenCancellationTokenCancel operation
scopeGlowAppScopeThe scope of the state machine.
- QuantumSpace scope means the state machine is shared with other services in the same QuantumSpace.
- Service scope means this state machine is only visible to other instances of the same service.
Returns
Type Parameters
T
SetStateAsync<T>(Guid, T, T, object, CancellationToken, GlowAppScope, AppDataSerializer)
Change State-Machine's state.
IAppStateMachineService.IAppStateMachineSetStateBuilder<T> SetStateAsync<T>(Guid fsmId, T fromState, T toState, object data, CancellationToken cancellationToken, GlowAppScope scope = GlowAppScope.Service, AppDataSerializer serializer = AppDataSerializer.Json) where T : struct, Enum
Parameters
fsmIdGuidThe FSM Id
fromStateTThe state that FSM must be to accept the new state request.
toStateTThe state to set the FSM
dataobjectThe state data to use for state change
cancellationTokenCancellationTokenCancel operation
scopeGlowAppScopeThe scope of the state machine.
- QuantumSpace scope means the state machine is shared with other services in the same QuantumSpace.
- Service scope means this state machine is only visible to other instances of the same service.
serializerAppDataSerializerSerialize to use for data
Returns
Type Parameters
T
SetStateAsync<T>(Guid, T, T, CancellationToken, GlowAppScope)
Change State-Machine's state.
IAppStateMachineService.IAppStateMachineSetStateBuilder<T> SetStateAsync<T>(Guid fsmId, T fromState, T toState, CancellationToken cancellationToken, GlowAppScope scope = GlowAppScope.Service) where T : struct, Enum
Parameters
fsmIdGuidThe FSM Id
fromStateTThe state that FSM must be to accept the new state request.
toStateTThe state to set the FSM
cancellationTokenCancellationTokenCancel operation
scopeGlowAppScopeThe scope of the state machine.
- QuantumSpace scope means the state machine is shared with other services in the same QuantumSpace.
- Service scope means this state machine is only visible to other instances of the same service.
Returns
Type Parameters
T