Class DataChangeEventProcessorFactory
Factory class for creating instances of DataChangeEventProcessor.
public sealed class DataChangeEventProcessorFactory : IDataChangeEventProcessorFactory
- Inheritance
-
DataChangeEventProcessorFactory
- Implements
- Inherited Members
Constructors
DataChangeEventProcessorFactory(IServiceProvider, IHostApplicationLifetime, IDataAccessPolicyFactory)
Initializes a new instance of the DataChangeEventProcessorFactory class.
public DataChangeEventProcessorFactory(IServiceProvider serviceProvider, IHostApplicationLifetime appLifetime, IDataAccessPolicyFactory policyFactory)
Parameters
serviceProviderIServiceProviderThe service provider used for resolving dependencies.
appLifetimeIHostApplicationLifetimeAn instance of IHostApplicationLifetime that allows the application to perform actions during the application's lifecycle events, such as startup, shutdown, or when the application is stopping. This parameter is used to gracefully manage tasks that need to respond to application lifecycle events.
policyFactoryIDataAccessPolicyFactoryThe factory for creating data access policies.
Methods
Create(IDatabaseOptions, CdcRepository, Func<IDbConnection>)
Creates an instance of DataChangeEventProcessor.
public IDataChangeEventProcessor Create(IDatabaseOptions dbConfig, CdcRepository cdcRepository, Func<IDbConnection> stateStoreConnectionFactory)
Parameters
dbConfigIDatabaseOptionsThe database configuration used for CDC processing.
cdcRepositoryCdcRepositoryThe CDC repository for querying change data.
stateStoreConnectionFactoryFunc<IDbConnection>Supplies a connection per CDC-state operation.
Returns
- IDataChangeEventProcessor
A configured IDataChangeEventProcessor instance.
Exceptions
- ArgumentNullException
Thrown if
dbConfig,cdcRepository, orstateStoreConnectionFactoryisnull.