Interface IConcurrencyScopeStrategy
- Assembly
- Cratis.Chronicle.dll
Defines a strategy for managing concurrency scopes.
public interface IConcurrencyScopeStrategy
- Extension Methods
Methods
GetScope(ConcurrencyDimensions, EventSourceId, EventStreamType?, EventStreamId?, EventSourceType?, IEnumerable<EventType>?)
Gets the ConcurrencyScope, narrowed to the dimensions an event source or event stream declares.
Task<ConcurrencyScope> GetScope(ConcurrencyDimensions dimensions, EventSourceId eventSourceId, EventStreamType? eventStreamType = null, EventStreamId? eventStreamId = null, EventSourceType? eventSourceType = null, IEnumerable<EventType>? eventTypes = null)
Parameters
dimensionsConcurrencyDimensionsThe ConcurrencyDimensions that take part in the scope.
eventSourceIdEventSourceIdThe EventSourceId being appended to.
eventStreamTypeEventStreamTypeOptional EventStreamType being appended to.
eventStreamIdEventStreamIdOptional EventStreamId being appended to.
eventSourceTypeEventSourceTypeOptional EventSourceType being appended to.
eventTypesIEnumerable<EventType>Optional event types to scope the check to.
Returns
Remarks
None declares nothing and gives the same scope as the scope without dimensions. The default implementation leaves out the stream and event source type dimensions that are not declared, and always includes the event source id; a strategy that can also leave the event source id out overrides it.
GetScope(EventSourceId, EventStreamType?, EventStreamId?, EventSourceType?, IEnumerable<EventType>?)
Gets a ConcurrencyScope for the specified parameters.
Task<ConcurrencyScope> GetScope(EventSourceId eventSourceId, EventStreamType? eventStreamType = null, EventStreamId? eventStreamId = null, EventSourceType? eventSourceType = null, IEnumerable<EventType>? eventTypes = null)
Parameters
eventSourceIdEventSourceIdThe EventSourceId to scope to.
eventStreamTypeEventStreamTypeOptional EventStreamType to scope to. Defaults to All.
eventStreamIdEventStreamIdOptional EventStreamId to scope to. Defaults to Default.
eventSourceTypeEventSourceTypeOptional EventSourceType to scope to. Defaults to Default.
eventTypesIEnumerable<EventType>Optional collection of EventType to scope to. Defaults to no specific event types.