Beispiel #1
0
        public ShardAgent(DocumentStore store, AsyncProjectionShard projectionShard, ILogger logger, CancellationToken cancellation)
        {
            if (cancellation == CancellationToken.None)
            {
                _cancellationSource = new CancellationTokenSource();
                _cancellation = _cancellationSource.Token;
            }

            Name = projectionShard.Name;

            _store = store;
            _projectionShard = projectionShard;
            _logger = logger;
            _cancellation = cancellation;

            _source = projectionShard.Source;

            _controller =
                new ProjectionController(projectionShard.Name, this, projectionShard.Source.Options);
        }
 internal ShardStartException(AsyncProjectionShard shard, Exception innerException) : base($"Failure while trying to stop '{shard.Name.Identity}'", innerException)
 {
 }
 internal void MarkAsRestarted(AsyncProjectionShard shard)
 {
     _states = _states.Remove(shard.Name.Identity);
 }
Beispiel #4
0
 public ShardState(AsyncProjectionShard shard, ShardAction action) : this(shard.Name, 0)
 {
     Action = action;
 }
Beispiel #5
0
 public ShardState(AsyncProjectionShard shard, long sequenceNumber) : this(shard.Name, sequenceNumber)
 {
 }