コード例 #1
0
 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
ファイル: BrokerController.cs プロジェクト: u8u5i/equeue
 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
ファイル: NpcServer.cs プロジェクト: xiaopohou/NetCoreRpc
 public void ShutDown()
 {
     _socketRemotingServer?.Shutdown();
     _routeCoordinator.DeleteAsync(_iPEndPoint).Wait();
     _routeCoordinator.CloseAsync().Wait();
 }