Stops the master processes and cleans up client connections.
6244
public void stop() throws Exception {
    if (mSecondaryMasterThread != null) {
      mSecondaryMaster.stop();
      while (mSecondaryMasterThread.isAlive()) {
        LOG.info("Stopping thread {}.", mSecondaryMasterThread.getName());
        mSecondaryMasterThread.join(1000);
      }
      mSecondaryMasterThread = null;
    }
    if (mMasterThread != null) {
      mMasterProcess.stop();
      while (mMasterThread.isAlive()) {
        LOG.info("Stopping thread {}.", mMasterThread.getName());
        mMasterThread.interrupt();
        mMasterThread.join(1000);
      }
      mMasterThread = null;
    }
    clearClients();
    System.clearProperty("alluxio.web.resources");
    System.clearProperty("alluxio.master.min.worker.threads");
  }
1050522
protected void cleanup() {
		int closed = 0;
		SendBuffer buffer;
		synchronized (buffers) {
			int buffersToClose = buffers.size() - maxConnections;
			if (buffersToClose < 1) {
				return;
			}
			Iterator<SendBuffer> i = buffers.values().iterator();
			while (i.hasNext()) {
				buffer = i.next();
				if (buffer.tryToClose()) {
					i.remove();
					closed++;
					if (closed >= buffersToClose) {
						return;
					}
				}
			}
		}
	}
45293
public void stop() {
        try {
            safeClose(myServerSocket);
            closeAllConnections();
            myThread.join();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
1118268
protected static function exitAndClearAll()
    {
        foreach (self::$_workers as $worker) {
            $socket_name = $worker->getSocketName();
            if ($worker->transport === 'unix' && $socket_name) {
                list(, $address) = explode(':', $socket_name, 2);
                @unlink($address);
            }
        }
        @unlink(self::$pidFile);
        self::log("Workerman[" . basename(self::$_startFile) . "] has been stopped");
        if (self::$onMasterStop) {
            call_user_func(self::$onMasterStop);
        }
        exit(0);
    }
1106295
public void cleanup() throws ResourceException
   {
      for (HelloWorldConnectionImpl connection : connections)
      {
         connection.setManagedConnection(null);
      }
      connections.clear();
   }
998386
private function cleanupSlaveConnections()
    {
        foreach ($this->config['database']['connections'] as $name => $connection) {
            if (count($connection['slaves']) <= 0) {
                unset($this->config['database']['connections'][$name]['slaves']);
            }
        }
    }
146780
def stop(self):
        
        log.info("%r: Stopping %r clients", self.container_id, len(self.clients))
        self.stopped = True
        self._close_clients()
699664
def stop(self):
        
        if self.is_run:
            self._service.shutdown()
            self._service.server_close()
1242009
def _cleanup(self):
        
        for channel in self._open_channels:
            try:
                self.disconnect_channel(channel)
            except Exception:  # pylint: disable=broad-except
                pass

        for handler in self._handlers.values():
            try:
                handler.tear_down()
            except Exception:  # pylint: disable=broad-except
                pass

        try:
            self.socket.close()
        except Exception:  # pylint: disable=broad-except
            self.logger.exception(
                "[%s:%s] _cleanup", self.fn or self.host, self.port)
        self._report_connection_status(
            ConnectionStatus(CONNECTION_STATUS_DISCONNECTED,
                             NetworkAddress(self.host, self.port)))
        self.connecting = True
50208
@LifecycleStop
  public void stop()
  {
    giant.lock();

    try {
      tasks.clear();
      taskFutures.clear();
      active = false;
      managerExec.shutdownNow();
      storageSyncExec.shutdownNow();
      managementMayBeNecessary.signalAll();
    }
    finally {
      giant.unlock();
    }
  }
2245
@Override
    public void destroyResources() {
        if (eurekaConnCleaner != null) {
            // Execute the connection cleaner one final time during shutdown
            eurekaConnCleaner.execute(connectionCleanerTask);
            eurekaConnCleaner.shutdown();
        }
        if (apacheHttpClient != null) {
            apacheHttpClient.close();
        }
    }
958339
def cleanup():
    """"""
    for sck in list(Wdb._sockets):
        try:
            sck.close()
        except Exception:
            log.warn('Error in cleanup', exc_info=True)
746496
public void close() {
    clientLock.writeLock().lock();
    try {
      if (client != null) {
        RPC.stopProxy(client);
        client = null;
      }
    } finally {
      clientLock.writeLock().unlock();
    }
  }
1012362
def stop(self):
        '''
        
        '''
        self.logger.info('Stopping client fuzzer')
        self._target_control_thread.stop()
        self.target.signal_mutated()
        super(ClientFuzzer, self).stop()
1342873
public void stop() {
        if (cacheDispatcher != null) {
            cacheDispatcher.quit();
            addMarker(EVENT_CACHE_DISPATCHER_STOP, cacheDispatcher);

        }
        for (NetworkDispatcher netDispatcher : networkDispatchers) {
            if (netDispatcher != null) {
                netDispatcher.quit();
                addMarker(EVENT_NETWORK_DISPATCHER_STOP, netDispatcher);

            }
        }
    }
572682
def stop(self):
        """"""

        if self._disconnector:
            self._disconnector.stop()

        self.client.disconnect()
279214
private void stopServices() {
        // Stop services in reverse order of starting.
        m_logger.debug("Stopping all services");
        ListIterator<Service> iter = m_startedServices.listIterator(m_startedServices.size());
        while (iter.hasPrevious()) {
            Service service = iter.previous();
            m_logger.debug("Stopping service: " + service.getClass().getSimpleName());
            service.stop();
            iter.remove();
        }
        m_initializedServices.clear();
        m_storageServices.clear();
    }