Exemple #1
0
        public override sealed IProjectionProcessingPhase[] CreateProcessingPhases(
            IPublisher publisher,
            IPublisher inputQueue,
            Guid projectionCorrelationId,
            PartitionStateCache partitionStateCache,
            Action updateStatistics,
            CoreProjection coreProjection,
            ProjectionNamesBuilder namingBuilder,
            ITimeProvider timeProvider,
            IODispatcher ioDispatcher,
            CoreProjectionCheckpointWriter coreProjectionCheckpointWriter)
        {
            var definesFold = _sourceDefinition.DefinesFold;

            var readerStrategy = CreateReaderStrategy(timeProvider);

            var zeroCheckpointTag = readerStrategy.PositionTagger.MakeZeroCheckpointTag();

            var checkpointManager = CreateCheckpointManager(
                projectionCorrelationId,
                publisher,
                ioDispatcher,
                namingBuilder,
                coreProjectionCheckpointWriter,
                definesFold,
                readerStrategy);

            var resultWriter = CreateFirstPhaseResultWriter(
                checkpointManager as IEmittedEventWriter,
                zeroCheckpointTag,
                namingBuilder);

            var emittedStreamsTracker = new EmittedStreamsTracker(ioDispatcher, _projectionConfig, namingBuilder);

            var firstPhase = CreateFirstProcessingPhase(
                publisher,
                inputQueue,
                projectionCorrelationId,
                partitionStateCache,
                updateStatistics,
                coreProjection,
                _subscriptionDispatcher,
                zeroCheckpointTag,
                checkpointManager,
                readerStrategy,
                resultWriter,
                emittedStreamsTracker);

            return(CreateProjectionProcessingPhases(
                       publisher,
                       inputQueue,
                       projectionCorrelationId,
                       namingBuilder,
                       partitionStateCache,
                       coreProjection,
                       ioDispatcher,
                       firstPhase));
        }
        public override sealed IProjectionProcessingPhase[] CreateProcessingPhases(
            IPublisher publisher,
            IPublisher inputQueue,
            Guid projectionCorrelationId,
            PartitionStateCache partitionStateCache,
            Action updateStatistics,
            CoreProjection coreProjection,
            ProjectionNamesBuilder namingBuilder,
            ITimeProvider timeProvider,
            IODispatcher ioDispatcher,
            CoreProjectionCheckpointWriter coreProjectionCheckpointWriter)
        {
            var definesFold = _sourceDefinition.DefinesFold;

            var readerStrategy = CreateReaderStrategy(timeProvider);

            var zeroCheckpointTag = readerStrategy.PositionTagger.MakeZeroCheckpointTag();

            var checkpointManager = CreateCheckpointManager(
                projectionCorrelationId,
                publisher,
                ioDispatcher,
                namingBuilder,
                coreProjectionCheckpointWriter,
                definesFold,
                readerStrategy);

            var resultWriter = CreateFirstPhaseResultWriter(
                checkpointManager as IEmittedEventWriter,
                zeroCheckpointTag,
                namingBuilder);

            var emittedStreamsTracker = new EmittedStreamsTracker(ioDispatcher, _projectionConfig, namingBuilder);

            var firstPhase = CreateFirstProcessingPhase(
                publisher,
                inputQueue,
                projectionCorrelationId,
                partitionStateCache,
                updateStatistics,
                coreProjection,
                _subscriptionDispatcher,
                zeroCheckpointTag,
                checkpointManager,
                readerStrategy,
                resultWriter,
                emittedStreamsTracker);

            return CreateProjectionProcessingPhases(
                publisher,
                inputQueue, 
                projectionCorrelationId,
                namingBuilder,
                partitionStateCache,
                coreProjection,
                ioDispatcher,
                firstPhase);
        }