Skip to content

PrimaryBasedLogViewAdaptor<TLogView, TLogEntry, TSubmissionEntry> Constructors

A general template for constructing log view adaptors that are based on a sequentially read and written primary. We use this to construct a variety of different log-consistency providers, all following the same basic pattern (read and write latest view from/to primary, and send notifications after writing).

Note that the log itself is transient, i.e. not actually saved to storage - only the latest view and some metadata (the log position, and write flags) is stored in the primary. It is safe to interleave calls to this adaptor (using grain scheduler only, of course).

Subclasses override ReadAsync and WriteAsync to read from / write to primary. Calls to the primary are serialized, i.e. never interleave.

PrimaryBasedLogViewAdaptor<TLogView, TLogEntry, TSubmissionEntry>(ILogViewAdaptorHost<TLogView, TLogEntry>, TLogView, ILogConsistencyProtocolServices)

View source
protected PrimaryBasedLogViewAdaptor<TLogView, TLogEntry, PrimaryBasedLogViewAdaptor(ILogViewAdaptorHost<TLogView, TLogEntry> host, TLogView initialstate, ILogConsistencyProtocolServices services)
Construct an instance, for the given parameters.

Parameters

hostILogViewAdaptorHost<TLogView, TLogEntry>
initialstateTLogView
servicesILogConsistencyProtocolServices