本文整理汇总了C#中EventStore.Projections.Core.Services.Processing.ProjectionNamesBuilder.MakeCheckpointStreamName方法的典型用法代码示例。如果您正苦于以下问题:C# ProjectionNamesBuilder.MakeCheckpointStreamName方法的具体用法?C# ProjectionNamesBuilder.MakeCheckpointStreamName怎么用?C# ProjectionNamesBuilder.MakeCheckpointStreamName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EventStore.Projections.Core.Services.Processing.ProjectionNamesBuilder
的用法示例。
在下文中一共展示了ProjectionNamesBuilder.MakeCheckpointStreamName方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateProjectionProcessingPhases
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};
}
示例2: DefaultCheckpointManager
public DefaultCheckpointManager(
ICoreProjection coreProjection, IPublisher publisher, Guid projectionCorrelationId,
RequestResponseDispatcher
<ClientMessage.ReadStreamEventsBackward, ClientMessage.ReadStreamEventsBackwardCompleted> readDispatcher,
RequestResponseDispatcher<ClientMessage.WriteEvents, ClientMessage.WriteEventsCompleted> writeDispatcher,
ProjectionConfig projectionConfig, string name,
PositionTagger positionTagger, ProjectionNamesBuilder namingBuilder, bool useCheckpoints,
bool emitStateUpdated, bool emitPartitionCheckpoints = false)
: base(
coreProjection, publisher, projectionCorrelationId, readDispatcher, writeDispatcher, projectionConfig,
name, positionTagger, namingBuilder, useCheckpoints, emitStateUpdated, emitPartitionCheckpoints)
{
_projectionCheckpointStreamId = namingBuilder.MakeCheckpointStreamName();
}
示例3: Create
public CoreProjection Create(
Guid projectionCorrelationId,
IPublisher inputQueue,
Guid workerId,
IPrincipal runAs,
IPublisher publisher,
IODispatcher ioDispatcher,
ReaderSubscriptionDispatcher subscriptionDispatcher,
ITimeProvider timeProvider)
{
if (inputQueue == null) throw new ArgumentNullException("inputQueue");
//if (runAs == null) throw new ArgumentNullException("runAs");
if (publisher == null) throw new ArgumentNullException("publisher");
if (ioDispatcher == null) throw new ArgumentNullException("ioDispatcher");
if (timeProvider == null) throw new ArgumentNullException("timeProvider");
var namingBuilder = new ProjectionNamesBuilder(_name, GetSourceDefinition());
var coreProjectionCheckpointWriter =
new CoreProjectionCheckpointWriter(
namingBuilder.MakeCheckpointStreamName(),
ioDispatcher,
_projectionVersion,
namingBuilder.EffectiveProjectionName);
var partitionStateCache = new PartitionStateCache();
return new CoreProjection(
this,
_projectionVersion,
projectionCorrelationId,
inputQueue,
workerId,
runAs,
publisher,
ioDispatcher,
subscriptionDispatcher,
_logger,
namingBuilder,
coreProjectionCheckpointWriter,
partitionStateCache,
namingBuilder.EffectiveProjectionName,
timeProvider);
}
示例4: CreateProjectionProcessingPhases
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};
}
示例5: DefaultCheckpointManager
public DefaultCheckpointManager(
IPublisher publisher, Guid projectionCorrelationId, ProjectionVersion projectionVersion, IPrincipal runAs,
RequestResponseDispatcher
<ClientMessage.ReadStreamEventsBackward, ClientMessage.ReadStreamEventsBackwardCompleted> readDispatcher,
RequestResponseDispatcher<ClientMessage.WriteEvents, ClientMessage.WriteEventsCompleted> writeDispatcher,
ProjectionConfig projectionConfig, string name, PositionTagger positionTagger,
ProjectionNamesBuilder namingBuilder, IResultEmitter resultEmitter, bool useCheckpoints,
bool emitPartitionCheckpoints = false)
: base(
publisher, projectionCorrelationId, projectionConfig, name, positionTagger, namingBuilder, resultEmitter,
useCheckpoints, emitPartitionCheckpoints)
{
if (readDispatcher == null) throw new ArgumentNullException("readDispatcher");
if (writeDispatcher == null) throw new ArgumentNullException("writeDispatcher");
_projectionVersion = projectionVersion;
_runAs = runAs;
_readDispatcher = readDispatcher;
_writeDispatcher = writeDispatcher;
_positionTagger = positionTagger;
_projectionCheckpointStreamId = namingBuilder.MakeCheckpointStreamName();
_zeroTag = positionTagger.MakeZeroCheckpointTag();
}
示例6: DeleteProjectionStreams
public void DeleteProjectionStreams()
{
var sourceDefinition = PersistedProjectionState.SourceDefinition ?? new ProjectionSourceDefinition();
var projectionNamesBuilder = new ProjectionNamesBuilder(_name, sourceDefinition);
if (PersistedProjectionState.DeleteCheckpointStream)
{
DeleteStream(projectionNamesBuilder.MakeCheckpointStreamName(), DeleteIfConditionsAreMet);
}
if (PersistedProjectionState.DeleteEmittedStreams)
{
if (_emittedStreamsDeleter == null)
{
_emittedStreamsDeleter = new EmittedStreamsDeleter(
_ioDispatcher,
projectionNamesBuilder.GetEmittedStreamsName(),
projectionNamesBuilder.GetEmittedStreamsCheckpointName());
}
_emittedStreamsDeleter.DeleteEmittedStreams(DeleteIfConditionsAreMet);
}
if(!PersistedProjectionState.DeleteCheckpointStream &&
!PersistedProjectionState.DeleteEmittedStreams)
{
DeleteIfConditionsAreMet();
}
}