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

ReactorType

Gets the type of the reactor.

Type ReactorType { get; }

Property Value

Type

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(EventContext, object, IReactorInvoker)

Handle next event.

Task<Catch> OnNext(EventContext context, object content, IReactorInvoker reactorInvoker)

Parameters

context EventContext

EventContext for the event.

content object

Actual content.

reactorInvoker IReactorInvoker

The IReactorInvoker.

Returns

Task<Catch>

Awaitable task.