コード例 #1
0
 protected override IProjectionProcessingPhase CreateFirstProcessingPhase(
     IPublisher publisher,
     IPublisher inputQueue,
     Guid projectionCorrelationId,
     PartitionStateCache partitionStateCache,
     Action updateStatistics,
     CoreProjection coreProjection,
     ReaderSubscriptionDispatcher subscriptionDispatcher,
     CheckpointTag zeroCheckpointTag,
     ICoreProjectionCheckpointManager checkpointManager,
     IReaderStrategy readerStrategy,
     IResultWriter resultWriter,
     IEmittedStreamsTracker emittedStreamsTracker)
 {
     return(new ParallelQueryMasterProjectionProcessingPhase(
                coreProjection,
                projectionCorrelationId,
                publisher,
                inputQueue,
                _projectionConfig,
                updateStatistics,
                _stateHandler,
                partitionStateCache,
                _name,
                _logger,
                zeroCheckpointTag,
                checkpointManager,
                subscriptionDispatcher,
                readerStrategy,
                resultWriter,
                _projectionConfig.CheckpointsEnabled,
                this.GetStopOnEof(),
                _spoolProcessingResponseDispatcher,
                emittedStreamsTracker));
 }
コード例 #2
0
 public ProgressWorkItem(
     CoreProjection projection, ICoreProjectionCheckpointManager checkpointManager, float progress)
     : base(projection, "") // checkpoints are serialized based on string.empty token stream name
 {
     _checkpointManager = checkpointManager;
     _progress          = progress;
 }
コード例 #3
0
 public ProgressWorkItem(ICoreProjectionCheckpointManager checkpointManager, IProgressResultWriter resultWriter, float progress)
     : base(null)
 {
     _checkpointManager = checkpointManager;
     _resultWriter      = resultWriter;
     _progress          = progress;
 }
コード例 #4
0
 public ProgressWorkItem(
     CoreProjection projection, ICoreProjectionCheckpointManager checkpointManager, float progress)
     : base(projection, null)
 {
     _checkpointManager = checkpointManager;
     _progress          = progress;
 }
コード例 #5
0
 public ProgressWorkItem(
     CoreProjection projection, ICoreProjectionCheckpointManager checkpointManager, float progress)
     : base(projection, null) 
 {
     _checkpointManager = checkpointManager;
     _progress = progress;
 }
コード例 #6
0
 public ProgressWorkItem(ICoreProjectionCheckpointManager checkpointManager, IProgressResultWriter resultWriter, float progress)
     : base(null) 
 {
     _checkpointManager = checkpointManager;
     _resultWriter = resultWriter;
     _progress = progress;
 }
        public WriteQueryResultProjectionProcessingPhaseBase(
            IPublisher publisher,
            int phase,
            string resultStream,
            ICoreProjectionForProcessingPhase coreProjection,
            PartitionStateCache stateCache,
            ICoreProjectionCheckpointManager checkpointManager,
            IEmittedEventWriter emittedEventWriter,
            IEmittedStreamsTracker emittedStreamsTracker)
        {
            if (resultStream == null) throw new ArgumentNullException("resultStream");
            if (coreProjection == null) throw new ArgumentNullException("coreProjection");
            if (stateCache == null) throw new ArgumentNullException("stateCache");
            if (checkpointManager == null) throw new ArgumentNullException("checkpointManager");
            if (emittedEventWriter == null) throw new ArgumentNullException("emittedEventWriter");
            if (emittedStreamsTracker == null) throw new ArgumentNullException("emittedStreamsTracker");
            if (string.IsNullOrEmpty(resultStream)) throw new ArgumentException("resultStream");

            _publisher = publisher;
            _phase = phase;
            _resultStream = resultStream;
            _coreProjection = coreProjection;
            _stateCache = stateCache;
            _checkpointManager = checkpointManager;
            _emittedEventWriter = emittedEventWriter;
            _emittedStreamsTracker = emittedStreamsTracker;
        }
コード例 #8
0
 protected EventSubscriptionBasedProjectionProcessingPhase(
     IPublisher publisher, ICoreProjectionForProcessingPhase coreProjection, Guid projectionCorrelationId,
     ICoreProjectionCheckpointManager checkpointManager, ProjectionConfig projectionConfig, string projectionName,
     ILogger logger, CheckpointTag zeroCheckpointTag, PartitionStateCache partitionStateCache,
     IResultWriter resultWriter, Action updateStatistics, ReaderSubscriptionDispatcher subscriptionDispatcher,
     IReaderStrategy readerStrategy, bool useCheckpoints, bool stopOnEof)
 {
     _publisher               = publisher;
     _coreProjection          = coreProjection;
     _projectionCorrelationId = projectionCorrelationId;
     _checkpointManager       = checkpointManager;
     _projectionConfig        = projectionConfig;
     _projectionName          = projectionName;
     _logger              = logger;
     _zeroCheckpointTag   = zeroCheckpointTag;
     _partitionStateCache = partitionStateCache;
     _resultWriter        = resultWriter;
     _processingQueue     = new CoreProjectionQueue(
         projectionCorrelationId, publisher, projectionConfig.PendingEventsThreshold, updateStatistics);
     _processingQueue.EnsureTickPending += EnsureTickPending;
     _subscriptionDispatcher             = subscriptionDispatcher;
     _readerStrategy = readerStrategy;
     _useCheckpoints = useCheckpoints;
     _stopOnEof      = stopOnEof;
 }
 public WriteQueryResultProjectionProcessingPhase(
     int phase, string resultStream, ICoreProjectionForProcessingPhase coreProjection,
     PartitionStateCache stateCache, ICoreProjectionCheckpointManager checkpointManager,
     IEmittedEventWriter emittedEventWriter)
     : base(phase, resultStream, coreProjection, stateCache, checkpointManager, emittedEventWriter)
 {
 }
 public WriteQueryEofProjectionProcessingPhase(
     int phase, string resultStream, ICoreProjectionForProcessingPhase coreProjection,
     PartitionStateCache stateCache, ICoreProjectionCheckpointManager checkpointManager,
     IEmittedEventWriter emittedEventWriter)
     : base(phase, resultStream, coreProjection, stateCache, checkpointManager, emittedEventWriter)
 {
 }
コード例 #11
0
ファイル: CoreProjection.cs プロジェクト: tubo70/EventStore
        private void BeginPhase(IProjectionProcessingPhase processingPhase, CheckpointTag startFrom)
        {
            _projectionProcessingPhase = processingPhase;
            _checkpointManager         = processingPhase.CheckpointManager;

            _projectionProcessingPhase.InitializeFromCheckpoint(startFrom);
            _checkpointManager.Start(startFrom);
        }
コード例 #12
0
 public CheckpointSuggestedWorkItem(
     CoreProjection projection, ProjectionSubscriptionMessage.CheckpointSuggested message,
     ICoreProjectionCheckpointManager checkpointManager)
     : base(projection, "") // checkpoints are serialized based on string.empty token stream name
 {
     _message           = message;
     _checkpointManager = checkpointManager;
 }
コード例 #13
0
 public FakeProjectionProcessingPhase(int phase, specification_with_multi_phase_core_projection specification,
                                      ICoreProjectionCheckpointManager checkpointManager, IReaderStrategy readerStrategy)
 {
     _phase             = phase;
     _specification     = specification;
     _checkpointManager = checkpointManager;
     _readerStrategy    = readerStrategy;
 }
コード例 #14
0
 // checkpoints are serialized based on string.empty token stream name
 public CheckpointSuggestedWorkItem(
     CoreProjection projection, ProjectionSubscriptionMessage.CheckpointSuggested message,
     ICoreProjectionCheckpointManager checkpointManager)
     : base(projection, "")
 {
     _message = message;
     _checkpointManager = checkpointManager;
 }
コード例 #15
0
 public CheckpointSuggestedWorkItem(
     CoreProjection projection, EventReaderSubscriptionMessage.CheckpointSuggested message,
     ICoreProjectionCheckpointManager checkpointManager)
     : base(projection) 
 {
     _projection = projection;
     _message = message;
     _checkpointManager = checkpointManager;
 }
コード例 #16
0
 public CheckpointSuggestedWorkItem(
     CoreProjection projection, EventReaderSubscriptionMessage.CheckpointSuggested message,
     ICoreProjectionCheckpointManager checkpointManager)
     : base(projection)
 {
     _projection        = projection;
     _message           = message;
     _checkpointManager = checkpointManager;
 }
コード例 #17
0
        private void BeginPhase(IProjectionProcessingPhase processingPhase, CheckpointTag startFrom, PartitionState rootPartitionState)
        {
            _projectionProcessingPhase = processingPhase;
            _projectionProcessingPhase.SetProjectionState(PhaseState.Starting);
            _checkpointManager = processingPhase.CheckpointManager;

            _projectionProcessingPhase.InitializeFromCheckpoint(startFrom);
            _checkpointManager.Start(startFrom, rootPartitionState);
        }
コード例 #18
0
 public CheckpointSuggestedWorkItem(
     IProjectionPhaseCheckpointManager projectionPhase, EventReaderSubscriptionMessage.CheckpointSuggested message,
     ICoreProjectionCheckpointManager checkpointManager)
     : base()
 {
     _projectionPhase   = projectionPhase;
     _message           = message;
     _checkpointManager = checkpointManager;
 }
コード例 #19
0
 public CheckpointSuggestedWorkItem(
     IProjectionPhaseCheckpointManager projectionPhase, EventReaderSubscriptionMessage.CheckpointSuggested message,
     ICoreProjectionCheckpointManager checkpointManager)
     : base() 
 {
     _projectionPhase = projectionPhase;
     _message = message;
     _checkpointManager = checkpointManager;
 }
コード例 #20
0
 public PartitionCompletedWorkItem(
     IEventProcessingProjectionPhase projection, ICoreProjectionCheckpointManager checkpointManager,
     string partition, CheckpointTag checkpointTag)
     : base()
 {
     _projection        = projection;
     _checkpointManager = checkpointManager;
     _partition         = partition;
     _checkpointTag     = checkpointTag;
 }
コード例 #21
0
 public PartitionCompletedWorkItem(
     IEventProcessingProjectionPhase projection, ICoreProjectionCheckpointManager checkpointManager,
     string partition, CheckpointTag checkpointTag)
     : base()
 {
     _projection = projection;
     _checkpointManager = checkpointManager;
     _partition = partition;
     _checkpointTag = checkpointTag;
 }
コード例 #22
0
 public FakeProjectionProcessingPhase(int phase,
                                      specification_with_multi_phase_core_projection <TLogFormat, TStreamId> specification,
                                      ICoreProjectionCheckpointManager checkpointManager, IReaderStrategy readerStrategy,
                                      IEmittedStreamsTracker emittedStreamsTracker)
 {
     _phase                 = phase;
     _specification         = specification;
     _checkpointManager     = checkpointManager;
     _readerStrategy        = readerStrategy;
     _emittedStreamsTracker = emittedStreamsTracker;
 }
コード例 #23
0
        public EventProcessingProjectionProcessingPhase(
            CoreProjection coreProjection,
            Guid projectionCorrelationId,
            IPublisher publisher,
            IPublisher inputQueue,
            ProjectionConfig projectionConfig,
            Action updateStatistics,
            IProjectionStateHandler projectionStateHandler,
            PartitionStateCache partitionStateCache,
            bool definesStateTransform,
            string projectionName,
            ILogger logger,
            CheckpointTag zeroCheckpointTag,
            ICoreProjectionCheckpointManager coreProjectionCheckpointManager,
            StatePartitionSelector statePartitionSelector,
            ReaderSubscriptionDispatcher subscriptionDispatcher,
            IReaderStrategy readerStrategy,
            IResultWriter resultWriter,
            bool useCheckpoints,
            bool stopOnEof,
            bool isBiState,
            bool orderedPartitionProcessing,
            IEmittedStreamsTracker emittedStreamsTracker,
            bool enableContentTypeValidation)
            : base(
                publisher,
                inputQueue,
                coreProjection,
                projectionCorrelationId,
                coreProjectionCheckpointManager,
                projectionConfig,
                projectionName,
                logger,
                zeroCheckpointTag,
                partitionStateCache,
                resultWriter,
                updateStatistics,
                subscriptionDispatcher,
                readerStrategy,
                useCheckpoints,
                stopOnEof,
                orderedPartitionProcessing,
                isBiState,
                emittedStreamsTracker,
                enableContentTypeValidation)
        {
            _projectionStateHandler = projectionStateHandler;
            _definesStateTransform  = definesStateTransform;
            _statePartitionSelector = statePartitionSelector;
            _isBiState = isBiState;

            _stopwatch = new Stopwatch();
        }
コード例 #24
0
 protected abstract IProjectionProcessingPhase CreateFirstProcessingPhase(
     IPublisher publisher,
     IPublisher inputQueue,
     Guid projectionCorrelationId,
     PartitionStateCache partitionStateCache,
     Action updateStatistics,
     CoreProjection coreProjection,
     ReaderSubscriptionDispatcher subscriptionDispatcher,
     CheckpointTag zeroCheckpointTag,
     ICoreProjectionCheckpointManager checkpointManager,
     IReaderStrategy readerStrategy,
     IResultWriter resultWriter);
コード例 #25
0
        public CoreProjection(
            string name, Guid projectionCorrelationId, IPublisher publisher,
            IProjectionStateHandler projectionStateHandler, ProjectionConfig projectionConfig,
            RequestResponseDispatcher
            <ClientMessage.ReadStreamEventsBackward, ClientMessage.ReadStreamEventsBackwardCompleted> readDispatcher,
            RequestResponseDispatcher <ClientMessage.WriteEvents, ClientMessage.WriteEventsCompleted> writeDispatcher,
            ILogger logger = null)
        {
            if (name == null)
            {
                throw new ArgumentNullException("name");
            }
            if (name == "")
            {
                throw new ArgumentException("name");
            }
            if (publisher == null)
            {
                throw new ArgumentNullException("publisher");
            }
            if (projectionStateHandler == null)
            {
                throw new ArgumentNullException("projectionStateHandler");
            }
            _projectionStateHandler  = projectionStateHandler;
            _projectionCorrelationId = projectionCorrelationId;

            var namingBuilder = new ProjectionNamesBuilder();

            _projectionStateHandler.ConfigureSourceProcessingStrategy(namingBuilder);

            _name = namingBuilder.ForceProjectionName ?? name;
            //TODO: move into name builder
            _stateStreamNamePattern = namingBuilder.StateStreamName ?? ProjectionsStreamPrefix + _name + "-{0}" + ProjectionsStateStreamSuffix;
            _stateStreamName        = namingBuilder.StateStreamName ?? ProjectionsStreamPrefix + _name + ProjectionsStateStreamSuffix;
            _projectionConfig       = projectionConfig;
            _logger          = logger;
            _publisher       = publisher;
            _readDispatcher  = readDispatcher;
            _writeDispatcher = writeDispatcher;
            var builder = new CheckpointStrategy.Builder();

            _projectionStateHandler.ConfigureSourceProcessingStrategy(builder);
            _checkpointStrategy  = builder.Build(_projectionConfig.Mode);
            _partitionStateCache = new PartitionStateCache();
            _processingQueue     = new CoreProjectionQueue(
                projectionCorrelationId, publisher, projectionConfig.PendingEventsThreshold, UpdateStatistics);
            _checkpointManager = this._checkpointStrategy.CreateCheckpointManager(
                this, projectionCorrelationId, this._publisher, this._readDispatcher,
                this._writeDispatcher, this._projectionConfig, this._name, _stateStreamName);
            GoToState(State.Initial);
        }
コード例 #26
0
        protected override IProjectionProcessingPhase CreateFirstProcessingPhase(
            IPublisher publisher, Guid projectionCorrelationId, PartitionStateCache partitionStateCache,
            Action updateStatistics, CoreProjection coreProjection, ReaderSubscriptionDispatcher subscriptionDispatcher,
            CheckpointTag zeroCheckpointTag, ICoreProjectionCheckpointManager checkpointManager, IReaderStrategy readerStrategy, IResultWriter resultWriter)
        {
            var statePartitionSelector = CreateStatePartitionSelector(
                _stateHandler, _sourceDefinition.ByCustomPartitions, _sourceDefinition.ByStreams);

            return(new EventProcessingProjectionProcessingPhase(
                       coreProjection, projectionCorrelationId, publisher, _projectionConfig, updateStatistics,
                       _stateHandler, partitionStateCache, _sourceDefinition.DefinesStateTransform, _name, _logger,
                       zeroCheckpointTag, checkpointManager, statePartitionSelector, subscriptionDispatcher, readerStrategy,
                       resultWriter, _projectionConfig.CheckpointsEnabled, this.GetStopOnEof()));
        }
コード例 #27
0
 public ParallelQueryMasterProjectionProcessingPhase(
     CoreProjection coreProjection, Guid projectionCorrelationId, IPublisher publisher,
     ProjectionConfig projectionConfig, Action updateStatistics, PartitionStateCache partitionStateCache,
     string name, ILogger logger, CheckpointTag zeroCheckpointTag,
     ICoreProjectionCheckpointManager checkpointManager, ReaderSubscriptionDispatcher subscriptionDispatcher,
     IReaderStrategy readerStrategy, IResultWriter resultWriter, bool checkpointsEnabled, bool stopOnEof,
     SpooledStreamReadingDispatcher spoolProcessingResponseDispatcher)
     : base(
         publisher, coreProjection, projectionCorrelationId, checkpointManager, projectionConfig, name, logger,
         zeroCheckpointTag, partitionStateCache, resultWriter, updateStatistics, subscriptionDispatcher,
         readerStrategy, checkpointsEnabled, stopOnEof)
 {
     _spoolProcessingResponseDispatcher = spoolProcessingResponseDispatcher;
 }
コード例 #28
0
 private void EnterInitial()
 {
     _completed = false;
     _partitionStateCache.Initialize();
     _projectionProcessingPhase = null;
     _checkpointManager         = _projectionProcessingPhases[0].CheckpointManager;
     _checkpointManager.Initialize();
     _checkpointReader.Initialize();
     _tickPending = false;
     if (_requiresRootPartition)
     {
         _partitionStateCache.CacheAndLockPartitionState("", new PartitionState("", null, CheckpointTag.Empty), null);
     }
     // NOTE: this is to workaround exception in GetState requests submitted by client
 }
コード例 #29
0
        public WriteQueryResultProjectionProcessingPhaseBase(
            IPublisher publisher,
            int phase,
            string resultStream,
            ICoreProjectionForProcessingPhase coreProjection,
            PartitionStateCache stateCache,
            ICoreProjectionCheckpointManager checkpointManager,
            IEmittedEventWriter emittedEventWriter,
            IEmittedStreamsTracker emittedStreamsTracker)
        {
            if (resultStream == null)
            {
                throw new ArgumentNullException("resultStream");
            }
            if (coreProjection == null)
            {
                throw new ArgumentNullException("coreProjection");
            }
            if (stateCache == null)
            {
                throw new ArgumentNullException("stateCache");
            }
            if (checkpointManager == null)
            {
                throw new ArgumentNullException("checkpointManager");
            }
            if (emittedEventWriter == null)
            {
                throw new ArgumentNullException("emittedEventWriter");
            }
            if (emittedStreamsTracker == null)
            {
                throw new ArgumentNullException("emittedStreamsTracker");
            }
            if (string.IsNullOrEmpty(resultStream))
            {
                throw new ArgumentException("resultStream");
            }

            _publisher             = publisher;
            _phase                 = phase;
            _resultStream          = resultStream;
            _coreProjection        = coreProjection;
            _stateCache            = stateCache;
            _checkpointManager     = checkpointManager;
            _emittedEventWriter    = emittedEventWriter;
            _emittedStreamsTracker = emittedStreamsTracker;
        }
 protected EventSubscriptionBasedProjectionProcessingPhase(
     IPublisher publisher,
     IPublisher inputQueue,
     ICoreProjectionForProcessingPhase coreProjection,
     Guid projectionCorrelationId,
     ICoreProjectionCheckpointManager checkpointManager,
     ProjectionConfig projectionConfig,
     string projectionName,
     ILogger logger,
     CheckpointTag zeroCheckpointTag,
     PartitionStateCache partitionStateCache,
     IResultWriter resultWriter,
     Action updateStatistics,
     ReaderSubscriptionDispatcher subscriptionDispatcher,
     IReaderStrategy readerStrategy,
     bool useCheckpoints,
     bool stopOnEof,
     bool orderedPartitionProcessing,
     bool isBiState,
     IEmittedStreamsTracker emittedStreamsTracker,
     bool enableContentTypeValidation)
 {
     _publisher               = publisher;
     _inputQueue              = inputQueue;
     _coreProjection          = coreProjection;
     _projectionCorrelationId = projectionCorrelationId;
     _checkpointManager       = checkpointManager;
     _projectionConfig        = projectionConfig;
     _projectionName          = projectionName;
     _logger              = logger;
     _zeroCheckpointTag   = zeroCheckpointTag;
     _partitionStateCache = partitionStateCache;
     _resultWriter        = resultWriter;
     _updateStatistics    = updateStatistics;
     _processingQueue     = new CoreProjectionQueue(publisher,
                                                    projectionConfig.PendingEventsThreshold,
                                                    orderedPartitionProcessing);
     _processingQueue.EnsureTickPending += EnsureTickPending;
     _subscriptionDispatcher             = subscriptionDispatcher;
     _readerStrategy              = readerStrategy;
     _useCheckpoints              = useCheckpoints;
     _stopOnEof                   = stopOnEof;
     _isBiState                   = isBiState;
     _progressResultWriter        = new ProgressResultWriter(this, _resultWriter);
     _inutQueueEnvelope           = new PublishEnvelope(_inputQueue);
     _emittedStreamsTracker       = emittedStreamsTracker;
     _enableContentTypeValidation = enableContentTypeValidation;
 }
コード例 #31
0
 public ParallelQueryMasterProjectionProcessingPhase(
     CoreProjection coreProjection,
     Guid projectionCorrelationId,
     IPublisher publisher,
     IPublisher inputQueue,
     ProjectionConfig projectionConfig,
     Action updateStatistics,
     IProjectionStateHandler stateHandler,
     PartitionStateCache partitionStateCache,
     string name,
     ILogger logger,
     CheckpointTag zeroCheckpointTag,
     ICoreProjectionCheckpointManager checkpointManager,
     ReaderSubscriptionDispatcher subscriptionDispatcher,
     IReaderStrategy readerStrategy,
     IResultWriter resultWriter,
     bool checkpointsEnabled,
     bool stopOnEof,
     SpooledStreamReadingDispatcher spoolProcessingResponseDispatcher,
     IEmittedStreamsTracker emittedStreamsTracker)
     : base(
         publisher,
         inputQueue,
         coreProjection,
         projectionCorrelationId,
         checkpointManager,
         projectionConfig,
         name,
         logger,
         zeroCheckpointTag,
         partitionStateCache,
         resultWriter,
         updateStatistics,
         subscriptionDispatcher,
         readerStrategy,
         checkpointsEnabled,
         stopOnEof,
         orderedPartitionProcessing: true,
         isBiState: false,
         emittedStreamsTracker: emittedStreamsTracker)
 {
     _stateHandler = stateHandler;
     _spoolProcessingResponseDispatcher = spoolProcessingResponseDispatcher;
     _spoolProcessingWorkItems          = new Dictionary <Guid, SpoolStreamProcessingWorkItem>();
 }
コード例 #32
0
        public EventProcessingProjectionProcessingPhase(
            CoreProjection coreProjection, Guid projectionCorrelationId, IPublisher publisher,
            ProjectionConfig projectionConfig, Action updateStatistics, IProjectionStateHandler projectionStateHandler,
            PartitionStateCache partitionStateCache, bool definesStateTransform, string projectionName, ILogger logger,
            CheckpointTag zeroCheckpointTag, ICoreProjectionCheckpointManager coreProjectionCheckpointManager,
            StatePartitionSelector statePartitionSelector, ReaderSubscriptionDispatcher subscriptionDispatcher,
            IReaderStrategy readerStrategy, IResultWriter resultWriter, bool useCheckpoints, bool stopOnEof)
            : base(
                publisher, coreProjection, projectionCorrelationId, coreProjectionCheckpointManager, projectionConfig,
                projectionName, logger, zeroCheckpointTag, partitionStateCache, resultWriter, updateStatistics,
                subscriptionDispatcher, readerStrategy, useCheckpoints, stopOnEof)
        {
            _projectionStateHandler = projectionStateHandler;
            _definesStateTransform  = definesStateTransform;
            _statePartitionSelector = statePartitionSelector;

            _stopwatch = new Stopwatch();
        }
コード例 #33
0
        protected override IProjectionProcessingPhase CreateFirstProcessingPhase(
            IPublisher publisher,
            IPublisher inputQueue,
            Guid projectionCorrelationId,
            PartitionStateCache partitionStateCache,
            Action updateStatistics,
            CoreProjection coreProjection,
            ReaderSubscriptionDispatcher subscriptionDispatcher,
            CheckpointTag zeroCheckpointTag,
            ICoreProjectionCheckpointManager checkpointManager,
            IReaderStrategy readerStrategy,
            IResultWriter resultWriter,
            IEmittedStreamsTracker emittedStreamsTracker)
        {
            var statePartitionSelector = CreateStatePartitionSelector();

            var orderedPartitionProcessing = _sourceDefinition.ByStreams && _sourceDefinition.IsBiState;

            return(new EventProcessingProjectionProcessingPhase(
                       coreProjection,
                       projectionCorrelationId,
                       publisher,
                       inputQueue,
                       _projectionConfig,
                       updateStatistics,
                       _stateHandler,
                       partitionStateCache,
                       _sourceDefinition.DefinesStateTransform,
                       _name,
                       _logger,
                       zeroCheckpointTag,
                       checkpointManager,
                       statePartitionSelector,
                       subscriptionDispatcher,
                       readerStrategy,
                       resultWriter,
                       _projectionConfig.CheckpointsEnabled,
                       this.GetStopOnEof(),
                       _sourceDefinition.IsBiState,
                       orderedPartitionProcessing: orderedPartitionProcessing,
                       emittedStreamsTracker: emittedStreamsTracker,
                       enableContentTypeValidation: _enableContentTypeValidation));
        }
コード例 #34
0
 protected override IProjectionProcessingPhase CreateFirstProcessingPhase(
     IPublisher publisher,
     IPublisher inputQueue,
     Guid projectionCorrelationId,
     PartitionStateCache partitionStateCache,
     Action updateStatistics,
     CoreProjection coreProjection,
     ReaderSubscriptionDispatcher subscriptionDispatcher,
     CheckpointTag zeroCheckpointTag,
     ICoreProjectionCheckpointManager checkpointManager,
     IReaderStrategy readerStrategy,
     IResultWriter resultWriter)
 {
     return new ParallelQueryMasterProjectionProcessingPhase(
         coreProjection,
         projectionCorrelationId,
         publisher,
         inputQueue,
         _projectionConfig,
         updateStatistics,
         _stateHandler,
         partitionStateCache,
         _name,
         _logger,
         zeroCheckpointTag,
         checkpointManager,
         subscriptionDispatcher,
         readerStrategy,
         resultWriter,
         _projectionConfig.CheckpointsEnabled,
         this.GetStopOnEof(),
         _spoolProcessingResponseDispatcher);
 }
コード例 #35
0
 protected abstract IProjectionProcessingPhase CreateFirstProcessingPhase(
     IPublisher publisher,
     IPublisher inputQueue,
     Guid projectionCorrelationId,
     PartitionStateCache partitionStateCache,
     Action updateStatistics,
     CoreProjection coreProjection,
     ReaderSubscriptionDispatcher subscriptionDispatcher,
     CheckpointTag zeroCheckpointTag,
     ICoreProjectionCheckpointManager checkpointManager,
     IReaderStrategy readerStrategy,
     IResultWriter resultWriter);
コード例 #36
0
        protected override IProjectionProcessingPhase CreateFirstProcessingPhase(
            IPublisher publisher,
            IPublisher inputQueue,
            Guid projectionCorrelationId,
            PartitionStateCache partitionStateCache,
            Action updateStatistics,
            CoreProjection coreProjection,
            ReaderSubscriptionDispatcher subscriptionDispatcher,
            CheckpointTag zeroCheckpointTag,
            ICoreProjectionCheckpointManager checkpointManager,
            IReaderStrategy readerStrategy,
            IResultWriter resultWriter)
        {
            var statePartitionSelector = CreateStatePartitionSelector();

            var orderedPartitionProcessing = _sourceDefinition.ByStreams && _sourceDefinition.IsBiState;

            return new EventProcessingProjectionProcessingPhase(
                coreProjection,
                projectionCorrelationId,
                publisher,
                inputQueue,
                _projectionConfig,
                updateStatistics,
                _stateHandler,
                partitionStateCache,
                _sourceDefinition.DefinesStateTransform,
                _name,
                _logger,
                zeroCheckpointTag,
                checkpointManager,
                statePartitionSelector,
                subscriptionDispatcher,
                readerStrategy,
                resultWriter,
                _projectionConfig.CheckpointsEnabled,
                this.GetStopOnEof(),
                _sourceDefinition.IsBiState,
                orderedPartitionProcessing: orderedPartitionProcessing);
        }
 public FakeProjectionProcessingPhase(int phase, specification_with_multi_phase_core_projection specification,
     ICoreProjectionCheckpointManager checkpointManager, IReaderStrategy readerStrategy)
 {
     _phase = phase;
     _specification = specification;
     _checkpointManager = checkpointManager;
     _readerStrategy = readerStrategy;
 }