Ejemplo n.º 1
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 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;
        }
 public WriteQueryEofProjectionProcessingPhase(
     int phase, string resultStream, ICoreProjectionForProcessingPhase coreProjection,
     PartitionStateCache stateCache, ICoreProjectionCheckpointManager checkpointManager,
     IEmittedEventWriter emittedEventWriter)
     : base(phase, resultStream, coreProjection, stateCache, checkpointManager, emittedEventWriter)
 {
 }
 public WriteQueryResultProjectionProcessingPhase(
     int phase, string resultStream, ICoreProjectionForProcessingPhase coreProjection,
     PartitionStateCache stateCache, ICoreProjectionCheckpointManager checkpointManager,
     IEmittedEventWriter emittedEventWriter)
     : base(phase, resultStream, coreProjection, stateCache, checkpointManager, emittedEventWriter)
 {
 }
Ejemplo n.º 5
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;
 }