Interface ISagaStateStore
Namespace: Cephalon.Behaviors.Patterns.Abstractions
Assembly: Cephalon.Behaviors.Patterns.dll
Provides saga state persistence for the saga-step execution pattern.
public interface ISagaStateStoreMethods
Section titled “Methods”DeleteAsync(string, CancellationToken)
Section titled “ DeleteAsync(string, CancellationToken)”Removes the saga state for the given saga identifier.
Task DeleteAsync(string sagaId, CancellationToken ct = default)Parameters
Section titled “Parameters”sagaId string
The unique identifier of the saga instance to remove.
A token that cancels the operation.
Returns
Section titled “Returns”A task that completes when the state has been removed.
GetAsync<T>(string, CancellationToken)
Section titled “ GetAsync<T>(string, CancellationToken)”Retrieves the saga state for the given saga identifier.
Task<T?> GetAsync<T>(string sagaId, CancellationToken ct = default)Parameters
Section titled “Parameters”sagaId string
The unique identifier of the saga instance.
A token that cancels the operation.
Returns
Section titled “Returns”Task<T?>
The deserialized saga state, or null if not found.
Type Parameters
Section titled “Type Parameters”T
The saga state type.
SaveAsync<T>(string, T, CancellationToken)
Section titled “ SaveAsync<T>(string, T, CancellationToken)”Persists the saga state for the given saga identifier.
Task SaveAsync<T>(string sagaId, T state, CancellationToken ct = default)Parameters
Section titled “Parameters”sagaId string
The unique identifier of the saga instance.
state T
The state to persist.
A token that cancels the operation.
Returns
Section titled “Returns”A task that completes when the state has been persisted.
Type Parameters
Section titled “Type Parameters”T
The saga state type.