Class AppendResultWaitForCompletionExtensions

Namespace
Cratis.Chronicle.Observation
Assembly
Cratis.Chronicle.dll

Provides extension methods for waiting for observer completion for append operations.

public static class AppendResultWaitForCompletionExtensions
Inheritance
AppendResultWaitForCompletionExtensions
Inherited Members

Methods

WaitForCompletion(IAppendResultForObserverCompletion, TimeSpan?)

Waits for observers handling the appended event types to process up to the append tail sequence number or fail.

public static Task<AppendResultWaitForCompletionResult> WaitForCompletion(this IAppendResultForObserverCompletion appendResult, TimeSpan? timeout = null)

Parameters

appendResult IAppendResultForObserverCompletion

The append result to wait for observer completion for.

timeout TimeSpan?

Optional server timeout. If none is provided, it defaults to 5 seconds. The client allows an additional 200 milliseconds for the server to report outstanding observers. InfiniteTimeSpan disables both deadlines.

Returns

Task<AppendResultWaitForCompletionResult>

An AppendResultWaitForCompletionResult describing completion and any failures.

Remarks

An append that never reached the log has nothing to wait for and completes trivially. An append that reached the log but carries no observer surface is a different thing entirely: completion is unknowable, so it is reported as a failure by name rather than as success.

Exceptions

CannotWaitForObserverCompletion

Thrown when the append result carries no observer surface, which is the case for the in-process testing surfaces.