Class ReadProtectionFrame
- Namespace
- Cratis.Chronicle.Transactions
- Assembly
- Cratis.Chronicle.dll
Keeps invocation enforcement alive until its first caller disposes the owning frame. Subsequent callers receive leases that cannot end enforcement.
public sealed class ReadProtectionFrame : IDisposable
- Inheritance
-
ReadProtectionFrame
- Implements
- Inherited Members
- Extension Methods
Properties
UnitCompleted
Gets whether the invocation's unit completed.
public bool UnitCompleted { get; }
Property Value
UnitOfWork
Gets the invocation's unit, including after ambient completion clears it.
public IUnitOfWork UnitOfWork { get; }
Property Value
Methods
Dispose()
public void Dispose()
RunAfterCommit(Func<IEventSequence, Task>)
Runs framework stream completion after a successful owner commit. No read or other immediate append is permitted by this capability.
public Task RunAfterCommit(Func<IEventSequence, Task> completion)
Parameters
completionFunc<IEventSequence, Task>The stream completion on the unit's target.
Returns
- Task
The completion task.
Exceptions
- ImmediateAppendWhileReadsAreProtected
The invocation did not successfully commit or no longer owns the active frame.