コード例 #1
0
        private void Stop()
        {
            _started = false;

            _writeDispatcher.CancelAll();
            _readDispatcher.CancelAll();

            _projections.Clear();
            _projectionsMap.Clear();
        }
コード例 #2
0
        private void Stop()
        {
            _started = false;
            foreach (var queue in _queues)
            {
                queue.Publish(new ProjectionCoreServiceMessage.Stop());
            }

            _writeDispatcher.CancelAll();
            _readDispatcher.CancelAll();

            _projections.Clear();
            _projectionsMap.Clear();
        }
コード例 #3
0
        private void StopProjections()
        {
            _readDispatcher.CancelAll();
            _writeDispatcher.CancelAll();

            var allProjections = _projections.Values;

            foreach (var projection in allProjections)
            {
                projection.Kill();
            }
            if (_projections.Count > 0)
            {
                _logger.Info("_projections is not empty after all the projections have been killed");
                _projections.Clear();
            }
        }
コード例 #4
0
        public void Handle(ProjectionCoreServiceMessage.Stop message)
        {
            _readDispatcher.CancelAll();
            _writeDispatcher.CancelAll();

            var allProjections = _projections.Values;

            foreach (var projection in allProjections)
            {
                projection.Kill();
            }

            if (_subscriptions.Count > 0)
            {
                _logger.Info("_subscriptions is not empty after all the projections have been killed");
                _subscriptions.Clear();
            }

            if (_projections.Count > 0)
            {
                _logger.Info("_projections is not empty after all the projections have been killed");
                _projections.Clear();
            }

            if (_distributionPoints.Count > 0)
            {
                _logger.Info("_distributionPoints is not empty after all the projections have been killed");
                _distributionPoints.Clear();
            }

            if (_projectionDistributionPoints.Count > 0)
            {
                _logger.Info("_projectionDistributionPoints is not empty after all the projections have been killed");
                _projectionDistributionPoints.Clear();
            }

            if (_distributionPointSubscriptions.Count > 0)
            {
                _logger.Info("_distributionPointSubscriptions is not empty after all the projections have been killed");
                _distributionPointSubscriptions.Clear();
            }

            _headingEventDistributionPoint.Stop();
            _stopped = true;
        }
コード例 #5
0
        private void Stop()
        {
            _started = false;
            foreach (var queue in _queues)
            {
                queue.Publish(new ProjectionCoreServiceMessage.StopCore());
                if (_runProjections >= RunProjections.System)
                {
                    queue.Publish(new Messages.ReaderCoreServiceMessage.StopReader());
                }
            }

            _writeDispatcher.CancelAll();
            _readDispatcher.CancelAll();

            _projections.Clear();
            _projectionsMap.Clear();
        }