Stops this container.
347834
public void stop() throws InterruptedException {
    // Tell docker to stop or eventually kill the container
    final String container = containerId.or(containerName);

    // Interrupt the thread blocking on waitContainer
    stopAsync().awaitTerminated();

    if (System.getenv("CONTAINER_STATS") != null) {
      try {
        log.info("container {} stats: {}", containerName, docker.stats(containerName));
      } catch (DockerException e) {
        log.warn("Could not log container stats. Exception was {}", e);
      }
    }
    try {
      docker.stopContainer(container, secondsToWaitBeforeKill);
    } catch (DockerException e) {
      if ((e instanceof ContainerNotFoundException) && !containerId.isPresent()) {
        // we tried to stop the container by name but no container of the given name existed.
        // this isn't surprising or exceptional, just means the container wasn't started yet.
      } else {
        log.warn("Stopping container {} failed", container, e);
      }
    }
  }
310756
def stop(self):
        '''
        
        '''
        # avoid getting called twice
        self.cleanup()
        if self.running:
            self.running = False
            self.timer_stop.set()
            self.timer.join()
146780
def stop(self):
        
        log.info("%r: Stopping %r clients", self.container_id, len(self.clients))
        self.stopped = True
        self._close_clients()
90825
def stop(self, handle, reason=None):
        """"""
        params = self._get_params(reason=reason)
        self._transport.stop(handle, params)
597912
public void stop() {
		if (this.writer != null) {
			this.writer.stop();
			this.writer.getLogRepositoryManager().stop();
			this.writer = null;
		}
	}
721883
def stop_serving(self):
        
        if self.container:
            self.container.down()
            self.container.join()
            self._cleanup()
        # for serving we can delete everything in the container root.
        _delete_tree(self.container_root)
1252855
def stop(self):
        '''
        
        '''
        self._server.shutdown()
        self._server.server_close()
        self._thread.join()
        self.running = False
877323
def stop(self):
        """"""
        with self.lock:
            self._message_received(ConnectionClosed(self._file, self))
458085
public final void stop() {
        SystemException finalException = null;

        try {
            _interlock.await();
        } catch (InterruptedException ex) {
            Thread.currentThread().interrupt();
        } finally {
            try {
                if (_unlocked) {
                    _log.info("Stopping {}.", getName());
                    doStop();
                }
            } catch (Exception ex) {
                finalException = new SystemException(ex);
            } finally {
                _started = false;
            }
        }
        if (finalException != null) {
            throw finalException;
        }
    }
257822
@Override public void stop() {
        lock.lock();
        try {
            if (process != null) {
                destroyProcess();
            }
            process = null;
        } finally {
            lock.unlock();
        }
    }
1315961
def stop(self):
    
    with self.lock:
      self.halting = True
      self.go.clear()
208816
@Override
	public void stop() {
		if (state.stop()){
			try{
				doStop();
				state.finishStopping();
			}catch(Exception e){
				state.failStopping();
				logger.warn("Failed to stop {}", this.getClass().getName(), e);
			}
		}

	}
1117543
public void stop() {
        CompletableFuture.runAsync(() -> {
            try {
                bootstrap.getInjector().getInstance(Server.class).stop();
            } catch (Exception ignore) {
                // Ignore NPE. At this point the server REALLY should be possible to find
            }
            bootstrap.shutdown();
        });
    }
1168788
public synchronized void stop()
  {
    running.set(false);
    if(thread.isAlive()) {
      thread.interrupt();
      wait(this, STOP_TIMEOUT);
    }
  }
148960
public void stop(){
        this.running = false;
        for(TargetSession session : sessions){
            if(!session.getConnection().stop()){
                this.running = true;
                LOGGER.error("Unable to stop session for " + session.getTargetName());
            }
        }
    }
1128846
def stop(self):
        
        logger.info('is being stopped', extra={'formatter': 'container', 'container': self.name})
        response = self.client.stop(self.id)

        while self.state()['running']:
            time.sleep(1)

        return response
180256
def stop(self):
        """"""
        self.reconnect = False
        self.logger.debug("Shutting down.")
        if self.transport:
            self.transport.close()