public NameServerController Shutdown()
 {
     if (Interlocked.CompareExchange(ref _isShuttingdown, 1, 0) == 0)
     {
         var watch = Stopwatch.StartNew();
         _logger.InfoFormat("NameServer starting to shutdown, bindingAddress: {0}", Setting.BindingAddress);
         _socketRemotingServer.Shutdown();
         ClusterManager.Shutdown();
         _logger.InfoFormat("NameServer shutdown success, timeSpent: {0}ms", watch.ElapsedMilliseconds);
     }
     return(this);
 }
示例#2
0
 public BrokerController Shutdown()
 {
     _producerSocketRemotingServer.Shutdown();
     _consumerSocketRemotingServer.Shutdown();
     _adminSocketRemotingServer.Shutdown();
     _consumerManager.Shutdown();
     _suspendedPullRequestManager.Shutdown();
     _queueService.Shutdown();
     _messageService.Shutdown();
     _offsetManager.Shutdown();
     _logger.InfoFormat("Broker shutdown, producer:[{0}], consumer:[{1}], admin:[{2}]", Setting.ProducerIPEndPoint, Setting.ConsumerIPEndPoint, Setting.AdminIPEndPoint);
     return(this);
 }
示例#3
0
 public void ShutDown()
 {
     _socketRemotingServer?.Shutdown();
     _routeCoordinator.DeleteAsync(_iPEndPoint).Wait();
     _routeCoordinator.CloseAsync().Wait();
 }