Table of Contents

Struct ProjectionAdvanceResult

Namespace
Excalibur.EventSourcing
Assembly
Excalibur.EventSourcing.Abstractions.dll

The outcome of a positioned write, with the position the store actually holds.

public readonly record struct ProjectionAdvanceResult : IEquatable<ProjectionAdvanceResult>
Implements
Inherited Members

Remarks

Why the position is carried rather than looked up. Without it a superseded caller cannot tell "someone is ahead of me, re-read and retry" from "this batch is already applied, move on", so it retries forever on the second. Every provider has the value in hand at the moment it refuses — a conditional-check failure returns it, and the stores that must read before writing have already read it — so carrying it costs nothing and removes a round trip on the contended path.

Constructors

ProjectionAdvanceResult(ProjectionAdvanceOutcome, long?)

The outcome of a positioned write, with the position the store actually holds.

public ProjectionAdvanceResult(ProjectionAdvanceOutcome Outcome, long? CurrentPosition)

Parameters

Outcome ProjectionAdvanceOutcome

What the write did.

CurrentPosition long?

The position the store holds now. Meaningful on Superseded, where it is what lets the caller stop.

Remarks

Why the position is carried rather than looked up. Without it a superseded caller cannot tell "someone is ahead of me, re-read and retry" from "this batch is already applied, move on", so it retries forever on the second. Every provider has the value in hand at the moment it refuses — a conditional-check failure returns it, and the stores that must read before writing have already read it — so carrying it costs nothing and removes a round trip on the contended path.

Properties

CurrentPosition

The position the store holds now. Meaningful on Superseded, where it is what lets the caller stop.

public long? CurrentPosition { get; init; }

Property Value

long?

Outcome

What the write did.

public ProjectionAdvanceOutcome Outcome { get; init; }

Property Value

ProjectionAdvanceOutcome