Exemplo n.º 1
0
        public Task StoreProgress(Type viewType, EventPage page)
        {
            Accumulator.Prune(page.To);

            if (shouldRestartFetcher())
            {
                _fetcher.Start(this, Lifecycle);
            }

            return(Task.CompletedTask);
        }
Exemplo n.º 2
0
        public async Task CachePage(EventPage page)
        {
            Accumulator.Store(page);

            if (Accumulator.CachedEventCount > _projection.AsyncOptions.MaximumStagedEventCount)
            {
                _logger.ProjectionBackedUp(this, Accumulator.CachedEventCount, page);
                await _fetcher.Pause().ConfigureAwait(false);
            }

            _executionTrack?.Post(page);
        }