Class ImmediateAppendRefusal

Namespace
Cratis.Chronicle.Transactions
Assembly
Cratis.Chronicle.dll

Refuses immediate appends in this asynchronous flow until the first caller disposes its frame. That frame owns completion only when the unit has no existing owner; subsequent acquisitions borrow its lifetime.

public sealed class ImmediateAppendRefusal : IDisposable
Inheritance
ImmediateAppendRefusal
Implements
Inherited Members
Extension Methods

Properties

UnitOfWork

Gets the unit that owns this frame, including after ambient completion clears the unit.

public IUnitOfWork UnitOfWork { get; }

Property Value

IUnitOfWork

Methods

Commit()

Commits the owning unit without admitting immediate appends from callbacks or serializers.

public Task Commit()

Returns

Task

The commit task. Inspect the unit's result after awaiting it.

Exceptions

ImmediateAppendRefusalRequiresOwner

This frame is refusal-only, borrowed, disposed, or not active in this flow.

Dispose()

Rolls back an unfinished unit only if this frame owns completion, then restores the previous flow state. Refusal-only frames leave completion to the existing owner. Borrowed frames do nothing.

public void Dispose()

Exceptions

ImmediateAppendRefusalRequiresOwner

The frame does not own the active lifetime in this flow.

UnitOfWorkIsCompleting

The unit still has a commit in flight; refusal remains active.

Rollback()

Rolls back the owning unit without ending append refusal.

public Task Rollback()

Returns

Task

The rollback task.

Exceptions

ImmediateAppendRefusalRequiresOwner

This frame is refusal-only, borrowed, disposed, or not active in this flow.