/// <summary> /// Initializes a new instance of the <see cref="ConsumerClient"/> class. /// </summary> /// <param name="clientManager">The <see cref="IClientManager" />.</param> /// <param name="subscriptions">The <see cref="ISubscriptions" />.</param> /// <param name="microservicesConfiguration">The <see cref="MicroservicesConfiguration" />.</param> /// <param name="streamProcessorStates">The <see cref="IStreamProcessorStateRepository" />.</param> /// <param name="eventHorizonEventsWriter">The <see cref="IWriteEventHorizonEvents" />.</param> /// <param name="policy">The <see cref="IAsyncPolicyFor{T}" /> <see cref="ConsumerClient" />.</param> /// <param name="eventProcessorPolicy">The <see cref="IAsyncPolicyFor{T}" /> <see cref="EventProcessor" />.</param> /// <param name="executionContextManager"><see cref="IExecutionContextManager" />.</param> /// <param name="reverseCallClients"><see cref="IReverseCallClients"/>.</param> /// <param name="logger">The <see cref="ILogger" />.</param> public ConsumerClient( IClientManager clientManager, ISubscriptions subscriptions, MicroservicesConfiguration microservicesConfiguration, IStreamProcessorStateRepository streamProcessorStates, IWriteEventHorizonEvents eventHorizonEventsWriter, IAsyncPolicyFor <ConsumerClient> policy, IAsyncPolicyFor <EventProcessor> eventProcessorPolicy, IExecutionContextManager executionContextManager, IReverseCallClients reverseCallClients, ILogger logger) { _clientManager = clientManager; _subscriptions = subscriptions; _microservicesConfiguration = microservicesConfiguration; _streamProcessorStates = streamProcessorStates; _eventHorizonEventsWriter = eventHorizonEventsWriter; _policy = policy; _eventProcessorPolicy = eventProcessorPolicy; _executionContextManager = executionContextManager; _logger = logger; _cancellationTokenSource = new CancellationTokenSource(); _cancellationToken = _cancellationTokenSource.Token; _reverseCallClients = reverseCallClients; }
/// <summary> /// Initializes a new instance of the <see cref="FilterValidators"/> class. /// </summary> /// <param name="tenant">The current tenant.</param> /// <param name="streamProcessorStates">The stream processor state repository to use to get the current state of the filter to validate.</param> /// <param name="filterDefinitions">The filter definitions to use to get the persisted definition of the filter to validate..</param> /// <param name="definitionComparer">The filter definition comparer to use to compare the filters.</param> /// <param name="serviceProvider">The service provider used to resolve the filter validator for a type of filter.</param> /// <param name="logger">The logger to use for logging.</param> public FilterValidators( TenantId tenant, IStreamProcessorStateRepository streamProcessorStates, IFilterDefinitions filterDefinitions, ICompareFilterDefinitions definitionComparer, IServiceProvider serviceProvider, ILogger logger) { _tenant = tenant; _streamProcessorStates = streamProcessorStates; _filterDefinitions = filterDefinitions; _definitionComparer = definitionComparer; _serviceProvider = serviceProvider; _logger = logger; }
/// <summary> /// Initializes a new instance of the <see cref="ResilientStreamProcessorStateRepository"/> class. /// </summary> /// <param name="repository">The <see cref="IStreamProcessorStateRepository" />.</param> /// <param name="policy">The <see cref="IPolicyFor{T}" /> <see cref="ResilientStreamProcessorStateRepository" />.</param> public ResilientStreamProcessorStateRepository(IStreamProcessorStateRepository repository, IAsyncPolicyFor <ResilientStreamProcessorStateRepository> policy) { _repository = repository; _policy = policy; }
/// <summary> /// Initializes a new instance of the <see cref="ResilientStreamProcessorStateRepository"/> class. /// </summary> /// <param name="repository">The underlying stream processor state repository.</param> /// <param name="policies">The policies to use for resilience.</param> public ResilientStreamProcessorStateRepository(IStreamProcessorStateRepository repository, IResilientStreamProcessorStateRepositoryPolicies policies) { _repository = repository; _policies = policies; }
/// <summary> /// Initializes a new instance of the <see cref="GetNextEventToReceiveForSubscription"/> class. /// </summary> /// <param name="repository">The stream processor state repository to use for getting subscription states.</param> public GetNextEventToReceiveForSubscription(IStreamProcessorStateRepository repository) { _repository = repository; }