Class Reactors
Represents an implementation of IReactors.
public class Reactors : IReactors
- Inheritance
-
Reactors
- Implements
- Inherited Members
- Extension Methods
Constructors
Reactors(IEventStore, IEventTypes, IClientArtifactsProvider, IServiceProvider, IReactorMiddlewares, IEventSerializer, ICausationManager, IIdentityProvider, ILogger<Reactors>, ILoggerFactory)
Initializes a new instance of the Reactors class.
public Reactors(IEventStore eventStore, IEventTypes eventTypes, IClientArtifactsProvider clientArtifactsProvider, IServiceProvider serviceProvider, IReactorMiddlewares middlewares, IEventSerializer eventSerializer, ICausationManager causationManager, IIdentityProvider identityProvider, ILogger<Reactors> logger, ILoggerFactory loggerFactory)
Parameters
eventStore
IEventStoreIEventStore the Reactors belong to.
eventTypes
IEventTypesIEventTypes for resolving event types.
clientArtifactsProvider
IClientArtifactsProviderIClientArtifactsProvider for getting client artifacts.
serviceProvider
IServiceProviderIServiceProvider to get instances of types.
middlewares
IReactorMiddlewaresIReactorMiddlewares to call.
eventSerializer
IEventSerializerIEventSerializer for serializing of events.
causationManager
ICausationManagerICausationManager for working with causation.
identityProvider
IIdentityProviderIIdentityProvider for managing identity context.
logger
ILogger<Reactors>ILogger for logging.
loggerFactory
ILoggerFactoryILoggerFactory for creating loggers.
Methods
Discover()
Discover all Reactors from the entry assembly and dependencies.
public Task Discover()
Returns
- Task
Awaitable task.
GetFailedPartitionsFor(Type)
Get any failed partitions for a specific reactor.
public Task<IEnumerable<FailedPartition>> GetFailedPartitionsFor(Type reactorType)
Parameters
reactorType
TypeType of reducer.
Returns
- Task<IEnumerable<FailedPartition>>
Collection of FailedPartition, if any.
GetFailedPartitionsFor<TReactor>()
Get any failed partitions for a specific reactor.
public Task<IEnumerable<FailedPartition>> GetFailedPartitionsFor<TReactor>()
Returns
- Task<IEnumerable<FailedPartition>>
Collection of FailedPartition, if any.
Type Parameters
TReactor
Type of reducer.
GetHandlerById(ReactorId)
Gets a specific handler by its ReactorId.
public IReactorHandler GetHandlerById(ReactorId id)
Parameters
Returns
- IReactorHandler
ReactorHandler instance.
GetHandlerFor<TReactor>()
Gets a specific handler by its TReactor
type.
public IReactorHandler GetHandlerFor<TReactor>() where TReactor : IReactor
Returns
- IReactorHandler
ReactorHandler instance.
Type Parameters
TReactor
The reactor type.
GetStateFor<TReactor>()
Get the state of a specific reactor.
public Task<ReactorState> GetStateFor<TReactor>() where TReactor : IReactor
Returns
Type Parameters
TReactor
Type of reactor get for.
Register()
Register all Reactors with Chronicle.
public Task Register()
Returns
- Task
Awaitable task.
Register<TReactor>()
Registers a TReactor
reactor with Chronicle.
public Task<IReactorHandler> Register<TReactor>() where TReactor : IReactor
Returns
- Task<IReactorHandler>
Awaitable task.
Type Parameters
TReactor
The reactor type.
Replay(ReactorId)
Replay a specific reactor by its identifier.
public Task Replay(ReactorId reactorId)
Parameters
Returns
- Task
Awaitable task.
Replay<TReactor>()
Replay a specific reactor.
public Task Replay<TReactor>() where TReactor : IReactor
Returns
- Task
Awaitable task.
Type Parameters
TReactor
Type of reactor to replay.