Interface ITransactionalProjectionEventStore
- Namespace
- Excalibur.EventSourcing
- Assembly
- Excalibur.EventSourcing.Abstractions.dll
Optional store-owned atomic append with aggregate-local projections.
public interface ITransactionalProjectionEventStore
Remarks
A confirmed success includes both the append and all callback writes. A pre-commit callback fault rolls back the transaction. An uncertain commit must not be reported as a proven rollback. An old append's event identities alone do not establish that its projection workset ran.
Methods
AppendWithProjectionsAsync(string, string, IReadOnlyList<IDomainEvent>, long, Func<ProjectionTransaction, CancellationToken, ValueTask>, CancellationToken)
Appends events and projection changes in one transaction.
ValueTask<AppendResult> AppendWithProjectionsAsync(string aggregateId, string aggregateType, IReadOnlyList<IDomainEvent> events, long expectedVersion, Func<ProjectionTransaction, CancellationToken, ValueTask> apply, CancellationToken cancellationToken)
Parameters
aggregateIdstringStream identifier.
aggregateTypestringStream type.
eventsIReadOnlyList<IDomainEvent>New events.
expectedVersionlongExpected last persisted version, or -1 for a new stream.
applyFunc<ProjectionTransaction, CancellationToken, ValueTask>Callback before append, using authoritative history and the supplied transaction.
cancellationTokenCancellationTokenCancellation token. Cancellation does not prove rollback after commit dispatch.
Returns
- ValueTask<AppendResult>
The confirmed or uncertain append outcome.