Table of Contents

Interface IReactorHandler

Namespace
Cratis.Chronicle.Reactors
Assembly
Cratis.Chronicle.dll

Defines a system that handle events for a specific reactor.

public interface IReactorHandler
Extension Methods

Properties

CancellationToken

Gets the CancellationToken for the handler.

CancellationToken CancellationToken { get; }

Property Value

CancellationToken

EventSequenceId

Gets the event log for the Reactor.

EventSequenceId EventSequenceId { get; }

Property Value

EventSequenceId

EventTypes

Gets the event types for the Reactor.

IEnumerable<EventType> EventTypes { get; }

Property Value

IEnumerable<EventType>

Id

Gets the unique identifier of the Reactor.

ReactorId Id { get; }

Property Value

ReactorId

Methods

Disconnect()

Disconnect the handler.

void Disconnect()

GetFailedPartitions()

Get any failed partitions for a specific reactor.

Task<IEnumerable<FailedPartition>> GetFailedPartitions()

Returns

Task<IEnumerable<FailedPartition>>

Collection of FailedPartition, if any.

GetState()

Get the current state of the Reactor.

Task<ReactorState> GetState()

Returns

Task<ReactorState>

Current ReactorState.

OnNext(EventMetadata, EventContext, object, IServiceProvider)

Handle next event.

Task OnNext(EventMetadata metadata, EventContext context, object content, IServiceProvider serviceProvider)

Parameters

metadata EventMetadata

EventMetadata for the event.

context EventContext

EventContext for the event.

content object

Actual content.

serviceProvider IServiceProvider

The IServiceProvider for creating the actual instance of the reactor.

Returns

Task

Awaitable task.