Stops the container instance.

@return void
177306
public function stop()
    {

        // start container shutdown
        $this->synchronized(function ($self) {
            $self->containerState = ContainerStateKeys::get(ContainerStateKeys::HALT);
        }, $this);

        do {
            // wait for 0.5 seconds
            usleep(500000);

            // log a message that we'll wait till application has been shutdown
            $this->getInitialContext()->getSystemLogger()->info(
                sprintf('Wait for container %s to be shutdown', $this->getContainerNode()->getName())
            );

            // query whether application state key is SHUTDOWN or not
            $waitForShutdown = $this->synchronized(function ($self) {
                return $self->containerState->notEquals(ContainerStateKeys::get(ContainerStateKeys::SHUTDOWN));
            }, $this);

        } while ($waitForShutdown);
    }
806352
@Invalidate
    public void stop() {
        unregisterConfigurationsExposedAsServices();
        if (registration != null) {
            registration.unregister();
            registration = null;
            try {
                watcher.removeAndStopIfNeeded(configFile.getParentFile());
            } catch (RuntimeException e) { //NOSONAR
                // An exception can be thrown when the platform is shutting down.
                // ignore it.
            }
        }
    }
435168
public function stop()
    {
        $this->shutdown = true;
        if($this->getProcess()->getPid() == getmypid()) {
            $this->getLogger()->notice('Worker {worker} shutting down', array('worker' => $this));
        }else{
            $this->getProcess()->kill(SIGQUIT);
        }
    }
927909
public function stop()
	{
		// do we need to rotate?
		if ($this->rotationInterval and $this->rotationTimer < time())
		{
			$this->rotate();
		}

		// stop the current session
		return $this->driver->stop();
	}
480170
public function stop()
    {

        // load the queue keys
        $queues = get_object_vars($this->getQueues());

        // iterate over the queues and shut them down
        /** @var AppserverIo\Psr\Pms\QueueInterface $queue */
        foreach ($queues as $queue) {
            $queue->stop();
        }
    }
522072
public function stop()
    {
        $this->stopWorkerPools();
        $this->workerJobSocket->disconnect($this->config['sockets']['worker_job']);
        $this->workerReplySocket->close();
        $this->clientSocket->close();
        $this->loop->stop();
    }
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);
      }
    }
  }
755988
public function stop()
    {
        if (!$this->started) {
            throw new Exception\ConnectionException('Client is not started');
        }

        if ($this->browserAutoruned) {
            $this->con->stop();
        }

        $this->started = false;
    }
80592
public function destroy()
    {
        if (
            isset($this->owner) &&
            $this->owner->_containerTrait
        ) {
            $this->owner->removeElement($this->short_name);
        }
    }
1202227
public function stop()
    {
        go(function(){
            $fileName = Imi::getRuntimePath(str_replace('\\', '-', App::getNamespace()) . '.pid');
            if(!is_file($fileName))
            {
                exit(sprintf('Pid file %s is not exists', $fileName));
            }
            $pid = json_decode(File::readFile($fileName), true);
            if($pid > 0)
            {
                $cmd = 'kill ' . $pid['masterPID'];
                echo $cmd, PHP_EOL;
                $result = Coroutine::exec($cmd);
                echo 'code:', $result['code'], ', signal:', $result['signal'], ', output:', $result['output'], PHP_EOL;
            }
            else
            {
                echo 'Pid does not exists!', PHP_EOL;
            }
        });
    }
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();
        });
    }
1319763
public void stop() {
        this.eventManager.fireEvent(EventType.SERVER_STOPPING, new Event().attribute("blade", this));
        this.server.stopAndWait();
        this.eventManager.fireEvent(EventType.SERVER_STOPPED, new Event().attribute("blade", this));
    }
865832
public static synchronized void shutdown() {
		if (container == null) {
			logger.debug("Jaguar has already stopped");
			return;
		}
		
		try {
			container.dispose();
		} finally {
			container = null;
			deployment = null;
			logger.info("Jaguar stopped");
		}
	}
660061
public function stop() : void
    {
        if ($this->startTime === null) {
            return;
        }

        $endTime = $this->clock->getTime();
        $duration = Duration::between($this->startTime, $endTime);

        $this->duration = $this->duration->plus($duration);
        $this->startTime = null;
    }
88273
@Override
    public void stop() {
        // Run jersey shutdown lifecycle
        if (container != null) {
            container.stop();
            container = null;
        }
        // Destroy the jersey service locator
        if (jerseyHandler != null && jerseyHandler.getDelegate() != null) {
            ServiceLocatorFactory.getInstance().destroy(jerseyHandler.getDelegate().getServiceLocator());
            jerseyHandler = null;
        }
        if (server != null) {
            server.close();
            server = null;
        }
    }
238746
def stop_containers(self):
        
        while len(self._containers):
            container = self._containers.pop()
            try:
                container.kill(signal.SIGKILL)
            except docker.errors.APIError:  # probably doesn't exist anymore
                pass
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)