Interface IReducerHandler
Defines a system that handle events for a specific reducer.
public interface IReducerHandler
- Extension Methods
Properties
CancellationToken
Gets the CancellationToken for the handler.
CancellationToken CancellationToken { get; }
Property Value
EventSequenceId
Gets the event sequence the reducer is reducing from.
EventSequenceId EventSequenceId { get; }
Property Value
EventTypes
Gets the event types for the reducer.
IEnumerable<EventType> EventTypes { get; }
Property Value
Id
Gets the unique identifier of the reducer.
ReducerId Id { get; }
Property Value
Invoker
Gets the IReducerInvoker that will perform the invocations.
IReducerInvoker Invoker { get; }
Property Value
IsActive
Gets whether the reducer should be actively running on the Kernel.
bool IsActive { get; }
Property Value
ReadModelType
Gets the type of the read model.
Type ReadModelType { get; }
Property Value
Methods
Disconnect()
Disconnect the handler.
void Disconnect()
GetFailedPartitions()
Get any failed partitions for a specific reducer.
Task<IEnumerable<FailedPartition>> GetFailedPartitions()
Returns
- Task<IEnumerable<FailedPartition>>
Collection of FailedPartition, if any.
GetState()
Get the current state of the reducer.
Task<ReducerState> GetState()
Returns
- Task<ReducerState>
The current ReducerState.
OnNext(IEnumerable<AppendedEvent>, object?, IServiceProvider)
Handle next events as bulk.
Task<ReduceResult> OnNext(IEnumerable<AppendedEvent> events, object? initial, IServiceProvider serviceProvider)
Parameters
events
IEnumerable<AppendedEvent>Collection of AppendedEvent to handle.
initial
objectInitial read model value.
serviceProvider
IServiceProviderThe IServiceProvider for creating the actual instance of the reducer.
Returns
- Task<ReduceResult>
Reduced read model.