ข้ามไปยังเนื้อหา

Interface ISagaStateStore

เนื้อหานี้ยังไม่ได้แปลเป็นภาษาไทย แสดงเป็นภาษาอังกฤษแทน

Namespace: Cephalon.Behaviors.Patterns.Abstractions
Assembly: Cephalon.Behaviors.Patterns.dll

Provides saga state persistence for the saga-step execution pattern.

public interface ISagaStateStore

Removes the saga state for the given saga identifier.

Task DeleteAsync(string sagaId, CancellationToken ct = default)

sagaId string

The unique identifier of the saga instance to remove.

ct CancellationToken

A token that cancels the operation.

Task

A task that completes when the state has been removed.

Retrieves the saga state for the given saga identifier.

Task<T?> GetAsync<T>(string sagaId, CancellationToken ct = default)

sagaId string

The unique identifier of the saga instance.

ct CancellationToken

A token that cancels the operation.

Task<T?>

The deserialized saga state, or null if not found.

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)

sagaId string

The unique identifier of the saga instance.

state T

The state to persist.

ct CancellationToken

A token that cancels the operation.

Task

A task that completes when the state has been persisted.

T

The saga state type.