Stop this ec2 instance.

@return true for successfully turned into 'stopping' and false for nothing changed
185022
public final boolean stop() {

        if (booting || running) {
            stopping = true;
            booting = false;
            onStopping();
            return true;
        } else {
            return false;
        }

    }
268029
@Override
	public void stop()
    {
        super.stop();
        if (connectorServer != null)
        {
            try
            {
                connectorServer.stop();
            }
            catch (Exception e)
            {
                log.error("Could not stop JMX connector server",e);
            }
            finally
            {
            	connectorServer = null;
            }
        }
        if (registry != null)
        {
	        try
	        {
	        	String jndiName = "jmxconnector-"+agentName;
	            registry.unbind(jndiName);
	        }
	        catch (Exception e)
	        {
	        	// Ignore
	        }
	        finally
	        {
	        	registry = null;
	        }
        }
        if (mBeanServerSocketFactory != null)
        {
        	try
            {
        		mBeanServerSocketFactory.close();
            }
        	catch (Exception e)
            {
                log.error("Could not close MBeans server socket factory",e);
            }
        	finally
            {
        		mBeanServerSocketFactory = null;
            }
        }
    }
207458
@Nonnull
  public EChange stop ()
  {
    // Already stopped?
    if (m_nStartDT == 0)
      return EChange.UNCHANGED;

    final long nCurrentNanoTime = getCurrentNanoTime ();
    m_nDurationNanos += (nCurrentNanoTime - m_nStartDT);
    m_nStartDT = 0;
    return EChange.CHANGED;
  }
676451
public synchronized void stop() {
        if (isRunning()) {
            running.set(false);
            DeviceFinder.getInstance().removeDeviceAnnouncementListener(announcementListener);
            dbServerPorts.clear();
            for (Client client : openClients.values()) {
                try {
                    client.close();
                } catch (Exception e) {
                    logger.warn("Problem closing " + client + " when stopping", e);
                }
            }
            openClients.clear();
            useCounts.clear();
            deliverLifecycleAnnouncement(logger, false);
        }
    }
1270820
static public function stop()
    {
        if ( !self::$hasStarted )
        {
             return false;
        }
        session_write_close();
        self::$hasStarted = false;
        self::$handlerInstance = null;
        return true;
    }
1248252
@Override
    public void stop()
    {
        // On linux, this doesn't entirely shut down Cassandra, just the RPC server.
        // jsvc takes care of taking the rest down
        logger.info("Cassandra shutting down...");
        if (nativeTransportService != null)
            nativeTransportService.destroy();
        StorageService.instance.setRpcReady(false);

        // On windows, we need to stop the entire system as prunsrv doesn't have the jsvc hooks
        // We rely on the shutdown hook to drain the node
        if (FBUtilities.isWindows)
            System.exit(0);
    }
880166
def stop(self):
        
        LOGGER.debug("natsd.Driver.stop")
        for requester in self.requester_registry:
            requester.stop()
        self.requester_registry.clear()

        for service in self.services_registry:
            if service.is_started:
                service.stop()
        self.services_registry.clear()

        return self
384734
public boolean stop() {
        if (!this.isTailing.get()) {
            LogWatchTailingManager.LOGGER.debug("Tailer not running, therefore not terminating.");
            return false;
        }
        /*
         * terminate tailer; we stop the scheduler and the task will therefore
         * never be started again
         */
        this.tailer.stop();
        LogWatchTailingManager.LOGGER.info("Terminated tailing #{} for {}.",
                this.numberOfTimesThatTailerWasStarted.get(), this.watch);
        return true;
    }
839337
@Nonnull
  public EChange stop ()
  {
    if (!m_aTimerTask.cancel ())
      return EChange.UNCHANGED;
    LOGGER.info ("Deadlock detector stopped!");
    return EChange.CHANGED;
  }
1179861
def stop(self):
        
        self.is_alive = False
        self.server_close()
        flows.Global.LOGGER.info("Server Stops " + (str(self.server_address)))
794383
public boolean shutdown() {
    mServer.shutdown();
    try {
      return mServer.awaitTermination(mServerShutdownTimeoutMs, TimeUnit.MILLISECONDS);
    } catch (InterruptedException ie) {
      Thread.currentThread().interrupt();
      return false;
    } finally {
      mServer.shutdownNow();
    }
  }
657500
private static void stopAll()
    { 
        if (_configs!=null)
        {
            synchronized(_configs)
            {
                for(int i=0;i<_servers.size();i++)
                {
                    HttpServer server = (HttpServer)_servers.get(i);
                    try{server.stop();}catch(InterruptedException e){}
                }
            }
        }
    }
1157829
def stop(self):
        
        # Check that everything is running
        if not self._running:
            logging.warning('PhoXi not running. Aborting stop')
            return False

        # Stop the subscribers
        self._color_im_sub.unregister()
        self._depth_im_sub.unregister()
        self._normal_map_sub.unregister()

        # Disconnect from the camera
        rospy.ServiceProxy('phoxi_camera/disconnect_camera', Empty)()

        self._running = False

        return True
1345352
public function stop()
    {
        if ($this->stopped) {
            return;
        }
        $this->stopped = true;
        if (in_array('one-by-one', $this->pollMode)) {
            $this->finish();
            return;
        }
        $this->appInstance->unsubscribeReal('s2c:' . $this->sessId, function ($redis) {
            $this->finish();
        });
    }
1252855
def stop(self):
        '''
        
        '''
        self._server.shutdown()
        self._server.server_close()
        self._thread.join()
        self.running = False
189469
def stop(name, kill=False):
    '''
    
    '''
    if _sd_version() >= 219:
        if kill:
            action = 'terminate'
        else:
            action = 'poweroff'
        ret = _machinectl('{0} {1}'.format(action, name))
    else:
        cmd = 'systemctl stop systemd-nspawn@{0}'.format(name)
        ret = __salt__['cmd.run_all'](cmd, python_shell=False)

    if ret['retcode'] != 0:
        __context__['retcode'] = salt.defaults.exitcodes.EX_UNAVAILABLE
        return False
    return True
1111530
protected function stopWorkerPools() : bool
    {
        if (empty($this->processes)) {
            return true;
        }
        foreach (array_keys($this->processes) as $poolName) {
            $this->stopWorkerPool($poolName);
        }
        return true;
    }