protected override IProjectionProcessingPhase[] CreateProjectionProcessingPhases( IPublisher publisher, Guid projectionCorrelationId, ProjectionNamesBuilder namingBuilder, PartitionStateCache partitionStateCache, CoreProjection coreProjection, IODispatcher ioDispatcher, IProjectionProcessingPhase firstPhase) { var coreProjectionCheckpointWriter = new CoreProjectionCheckpointWriter( namingBuilder.MakeCheckpointStreamName(), ioDispatcher, _projectionVersion, _name); var checkpointManager2 = new DefaultCheckpointManager( publisher, projectionCorrelationId, _projectionVersion, _projectionConfig.RunAs, ioDispatcher, _projectionConfig, _name, new PhasePositionTagger(1), namingBuilder, GetUseCheckpoints(), false, _sourceDefinition.DefinesFold, coreProjectionCheckpointWriter); IProjectionProcessingPhase writeResultsPhase; if (GetProducesRunningResults() || !string.IsNullOrEmpty(_sourceDefinition.CatalogStream) && _sourceDefinition.ByStreams) writeResultsPhase = new WriteQueryEofProjectionProcessingPhase( 1, namingBuilder.GetResultStreamName(), coreProjection, partitionStateCache, checkpointManager2, checkpointManager2); else writeResultsPhase = new WriteQueryResultProjectionProcessingPhase( 1, namingBuilder.GetResultStreamName(), coreProjection, partitionStateCache, checkpointManager2, checkpointManager2); return new[] {firstPhase, writeResultsPhase}; }
protected override IProjectionProcessingPhase[] CreateProjectionProcessingPhases( IPublisher publisher, Guid projectionCorrelationId, ProjectionNamesBuilder namingBuilder, PartitionStateCache partitionStateCache, CoreProjection coreProjection, IODispatcher ioDispatcher, IProjectionProcessingPhase firstPhase) { var coreProjectionCheckpointWriter = new CoreProjectionCheckpointWriter( namingBuilder.MakeCheckpointStreamName(), ioDispatcher, _projectionVersion, _name); var checkpointManager2 = new DefaultCheckpointManager( publisher, projectionCorrelationId, _projectionVersion, _projectionConfig.RunAs, ioDispatcher, _projectionConfig, _name, new PhasePositionTagger(1), namingBuilder, GetUseCheckpoints(), false, _sourceDefinition.DefinesFold, coreProjectionCheckpointWriter); IProjectionProcessingPhase writeResultsPhase; if (GetProducesRunningResults() || !string.IsNullOrEmpty(_sourceDefinition.CatalogStream) && _sourceDefinition.ByStreams) { writeResultsPhase = new WriteQueryEofProjectionProcessingPhase( 1, namingBuilder.GetResultStreamName(), coreProjection, partitionStateCache, checkpointManager2, checkpointManager2); } else { writeResultsPhase = new WriteQueryResultProjectionProcessingPhase( 1, namingBuilder.GetResultStreamName(), coreProjection, partitionStateCache, checkpointManager2, checkpointManager2); } return(new[] { firstPhase, writeResultsPhase }); }
protected override IProjectionProcessingPhase[] CreateProjectionProcessingPhases( IPublisher publisher, IPublisher inputQueue, Guid projectionCorrelationId, ProjectionNamesBuilder namingBuilder, PartitionStateCache partitionStateCache, CoreProjection coreProjection, IODispatcher ioDispatcher, IProjectionProcessingPhase firstPhase) { var coreProjectionCheckpointWriter = new CoreProjectionCheckpointWriter( namingBuilder.MakeCheckpointStreamName(), ioDispatcher, _projectionVersion, _name); var checkpointManager2 = new DefaultCheckpointManager( publisher, projectionCorrelationId, _projectionVersion, SystemAccount.Principal, ioDispatcher, _projectionConfig, _name, new PhasePositionTagger(1), namingBuilder, GetUseCheckpoints(), false, _sourceDefinition.DefinesFold, coreProjectionCheckpointWriter); IProjectionProcessingPhase writeResultsPhase; if (GetProducesRunningResults()) { writeResultsPhase = new WriteQueryEofProjectionProcessingPhase( publisher, 1, namingBuilder.GetResultStreamName(), coreProjection, partitionStateCache, checkpointManager2, checkpointManager2, firstPhase.EmittedStreamsTracker); } else { writeResultsPhase = new WriteQueryResultProjectionProcessingPhase( publisher, 1, namingBuilder.GetResultStreamName(), coreProjection, partitionStateCache, checkpointManager2, checkpointManager2, firstPhase.EmittedStreamsTracker); } return(new[] { firstPhase, writeResultsPhase }); }
protected override IProjectionProcessingPhase[] CreateProjectionProcessingPhases( IPublisher publisher, IPublisher inputQueue, Guid projectionCorrelationId, ProjectionNamesBuilder namingBuilder, PartitionStateCache partitionStateCache, CoreProjection coreProjection, IODispatcher ioDispatcher, IProjectionProcessingPhase firstPhase) { var coreProjectionCheckpointWriter = new CoreProjectionCheckpointWriter( namingBuilder.MakeCheckpointStreamName(), ioDispatcher, _projectionVersion, _name); var checkpointManager2 = new DefaultCheckpointManager( publisher, projectionCorrelationId, _projectionVersion, _projectionConfig.RunAs, ioDispatcher, _projectionConfig, _name, new PhasePositionTagger(1), namingBuilder, GetUseCheckpoints(), false, _sourceDefinition.DefinesFold, coreProjectionCheckpointWriter); var writeResultsPhase = new WriteQueryEofProjectionProcessingPhase( publisher, 1, namingBuilder.GetResultStreamName(), coreProjection, partitionStateCache, checkpointManager2, checkpointManager2, firstPhase.EmittedStreamsTracker); return new[] {firstPhase, writeResultsPhase}; }