Class Reactors
Represents an implementation of IReactors.
public class Reactors : IReactors
- Inheritance
-
Reactors
- Implements
- Inherited Members
- Extension Methods
Constructors
Reactors(IEventStore, IEventTypes, IClientArtifactsProvider, IServiceProvider, IClientArtifactsActivator, IActivateReactorMiddlewares, IEventSerializer, ICausationManager, IIdentityProvider, ILogger<Reactors>, ILoggerFactory)
Initializes a new instance of the Reactors class.
public Reactors(IEventStore eventStore, IEventTypes eventTypes, IClientArtifactsProvider clientArtifactsProvider, IServiceProvider serviceProvider, IClientArtifactsActivator artifactActivator, IActivateReactorMiddlewares middlewaresActivator, IEventSerializer eventSerializer, ICausationManager causationManager, IIdentityProvider identityProvider, ILogger<Reactors> logger, ILoggerFactory loggerFactory)
Parameters
eventStoreIEventStoreIEventStore the Reactors belong to.
eventTypesIEventTypesIEventTypes for resolving event types.
clientArtifactsProviderIClientArtifactsProviderIClientArtifactsProvider for getting client artifacts.
serviceProviderIServiceProviderIServiceProvider to get instances of types.
artifactActivatorIClientArtifactsActivatorIClientArtifactsActivator for creating artifact instances.
middlewaresActivatorIActivateReactorMiddlewaresIReactorMiddlewares to call.
eventSerializerIEventSerializerIEventSerializer for serializing of events.
causationManagerICausationManagerICausationManager for working with causation.
identityProviderIIdentityProviderIIdentityProvider for managing identity context.
loggerILogger<Reactors>ILogger for logging.
loggerFactoryILoggerFactoryILoggerFactory 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
reactorTypeTypeType 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
TReactorType 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
TReactorThe reactor type.
GetStateFor<TReactor>()
Get the state of a specific reactor.
public Task<ReactorState> GetStateFor<TReactor>() where TReactor : IReactor
Returns
Type Parameters
TReactorType 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
TReactorThe 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
TReactorType of reactor to replay.