Exemple #1
0
 /* SUBSCRIPTION SECTION */
 public void Handle(SystemMessage.BecomeShuttingDown message)
 {
     foreach (var subscription in _subscriptionsById.Values)
     {
         DropSubscription(subscription, sendDropNotification: true);
     }
     _queuedHandler.RequestStop();
 }
 public void Handle(SystemMessage.BecomeShuttingDown message)
 {
     try {
         _timer.Dispose();
         _systemStats.Dispose();
     } catch (ObjectDisposedException) {
         // ok, no problem if already disposed
     }
 }
Exemple #3
0
 public void Handle(SystemMessage.BecomeShuttingDown message)
 {
     if (message.ShutdownHttp)
     {
         Shutdown();
     }
     _inputBus.Publish(
         new SystemMessage.ServiceShutdown(
             $"HttpServer [{String.Join(", ", EndPoints)}]"));
 }
Exemple #4
0
 public void Handle(SystemMessage.BecomeShuttingDown message)
 {
     if (message.ShutdownHttp)
     {
         Shutdown();
     }
     _inputBus.Publish(
         new SystemMessage.ServiceShutdown(
             string.Format("HttpServer [{0}]", string.Join(", ", _server._listenPrefixes))));
 }
Exemple #5
0
        void IHandle <SystemMessage.BecomeShuttingDown> .Handle(SystemMessage.BecomeShuttingDown message)
        {
            try {
                _workersMultiHandler.Stop();
            } catch (Exception exc) {
                Log.ErrorException(exc, "Error while stopping readers multi handler.");
            }

            _bus.Publish(new SystemMessage.ServiceShutdown("StorageReader"));
        }
 public void Handle(SystemMessage.BecomeShuttingDown message)
 {
     _server.ShutdownAsync()
     .ContinueWith(t => {
         if (t.IsFaulted)
         {
             Log.ErrorException(t.Exception, "Error shutting down gRpc server");
         }
     });
 }
        private void Handle(SystemMessage.BecomeShuttingDown message)
        {
            Log.Info("[{0}] IS SHUTTING DOWN!!! FAREWELL, WORLD...", _httpEndPoint);

            _state = VNodeState.ShuttingDown;

            _mainQueue.Publish(TimerMessage.Schedule.Create(ShutdownTimeout,
                                                            new PublishEnvelope(_mainQueue),
                                                            new SystemMessage.ShutdownTimeout()));
            _outputBus.Publish(message);
        }
Exemple #8
0
 public void Handle(SystemMessage.BecomeShuttingDown message)
 {
     if (_subsystems == null)
     {
         return;
     }
     foreach (var subsystem in _subsystems)
     {
         subsystem.Stop();
     }
 }
        private void Handle(SystemMessage.BecomeShuttingDown message)
        {
            if (_state == VNodeState.ShuttingDown || _state == VNodeState.Shutdown)
            {
                return;
            }

            Log.Info("========== [{0}] IS SHUTTING DOWN...", _nodeInfo.InternalHttp);
            _master                = null;
            _stateCorrelationId    = message.CorrelationId;
            _exitProcessOnShutdown = message.ExitProcess;
            _state = VNodeState.ShuttingDown;
            _mainQueue.Publish(TimerMessage.Schedule.Create(ShutdownTimeout, _publishEnvelope, new SystemMessage.ShutdownTimeout()));
            _outputBus.Publish(message);
        }
 public void Handle(SystemMessage.BecomeShuttingDown message)
 {
     _stop = true;
 }
Exemple #11
0
 public void Handle(SystemMessage.BecomeShuttingDown message)
 {
     _serverListener.Stop();
 }
 public void Handle(SystemMessage.BecomeShuttingDown message) => _ready = false;
Exemple #13
0
 public void Handle(SystemMessage.BecomeShuttingDown message)
 {
     Stop();
 }
Exemple #14
0
 void IHandle <SystemMessage.BecomeShuttingDown> .Handle(SystemMessage.BecomeShuttingDown message)
 {
     Dispose();
 }
Exemple #15
0
 public void Handle(SystemMessage.BecomeShuttingDown message)
 {
     _bus.Publish(new ProjectionMessage.CoreService.Stop());
     _running = false;
     _connectionManager.Stop();
 }
Exemple #16
0
 public void Handle(SystemMessage.BecomeShuttingDown message)
 {
     _timer.Change(Timeout.Infinite, Timeout.Infinite);
     _timer.Dispose();
     _systemStats.Dispose();
 }