Shut down the SparkContext.
979147
def stop(self):
        
        if getattr(self, "_jsc", None):
            try:
                self._jsc.stop()
            except Py4JError:
                # Case: SPARK-18523
                warnings.warn(
                    'Unable to cleanly shutdown Spark JVM process.'
                    ' It is possible that the process has crashed,'
                    ' been killed or may also be in a zombie state.',
                    RuntimeWarning
                )
            finally:
                self._jsc = None
        if getattr(self, "_accumulatorServer", None):
            self._accumulatorServer.shutdown()
            self._accumulatorServer = None
        with SparkContext._lock:
            SparkContext._active_spark_context = None
519607
protected void deactivate(ComponentContext context) {
        destinationRef.deactivate(context);
        bootstrapContextRef.deactivate(context);
        rrsXAResFactorySvcRef.deactivate(context);
    }
384503
public void stop() {
        Plugin plugin = getPlugin();
        if (plugin != null) {
            try {
                LOGGER.log(Level.FINE, "Stopping {0}", shortName);
                plugin.stop();
            } catch (Throwable t) {
                LOGGER.log(WARNING, "Failed to shut down " + shortName, t);
            }
        } else {
            LOGGER.log(Level.FINE, "Could not find Plugin instance to stop for {0}", shortName);
        }
        // Work around a bug in commons-logging.
        // See http://www.szegedi.org/articles/memleak.html
        LogFactory.release(classLoader);
    }
725529
@Deactivate
    protected void deactivate(ComponentContext context) {
        lock.writeLock().lock();
        try {
            componentContext = null;
            properties = null;
            threadContextConfigurations = null;
        } finally {
            lock.writeLock().unlock();
        }
    }
862724
public void shutdown ()
    {
        // close all of the connections
        for (Map.Entry<String, Mapping> entry : _keys.entrySet()) {
            entry.getValue().closeConnection(entry.getKey());
        }

        // clear out our mapping tables
        _keys.clear();
        _idents.clear();
    }
400653
def stop(self):
        """"""
        if self.__task:
            self.__task.cancel()
        if self.__poller:
            self.__poller.unregister(self.zap_socket)
            self.__poller = None
        super().stop()
400153
public void close() {
		forwardEngine.close();
		if (forwardEngine != reverseEngine) {
			reverseEngine.close();
		}
		for (Long ssrc : contexts.keySet()) {
			SRTPCryptoContext context = contexts.get(ssrc);
			if (context != null) {
				context.close();
				contexts.remove(ssrc);
			}
		}
	}
185312
protected void deactivate(ComponentContext context) {
        final boolean trace = TraceComponent.isAnyTracingEnabled();
        if (trace && tc.isEntryEnabled())
            Tr.entry(this, tc, "deactivate");

        destroyConnectionFactories(true);

        if (trace && tc.isEntryEnabled())
            Tr.exit(this, tc, "deactivate", id + ' ' + context.getProperties().get(JNDI_NAME));
    }
1331363
protected void deactivate(ComponentContext context) {
        appListener.unregister(this);

        // shut down instances that were created
        if (!clients.isEmpty())
            AccessController.doPrivileged(new PrivilegedAction<Void>() {
                @Override
                public Void run() {
                    Method shutdown = null;
                    for (Object client : clients.values())
                        try {
                            if (shutdown == null)
                                shutdown = client.getClass().getMethod("shutdown");
                            shutdown.invoke(client);
                        } catch (Throwable x) {
                            // FFDC will be logged, otherwise ignore
                        }
                    return null;
                }
            });

        containerAuthDataRef.deactivate(context);
        sslConfig.deactivate(context);
    }
892738
def stopContext(self, context):
        

        # Use pymongo directly to drop all collections of created db
        if ((self.clear_context['module'] and inspect.ismodule(context)) or
           (self.clear_context['class'] and inspect.isclass(context))):
            self.connection.drop_database(self.database_name)
177289
public void shutdown() {
		Iterator<ExclusionFilterFactory> itr = factories.iterator();
		while (itr.hasNext()) {
			ExclusionFilterFactory i = itr.next();
			i.shutdown();
		}
	}
1240154
public static void shutdown(final LoggerContext context) {
        if (context != null && context instanceof Terminable) {
            ((Terminable) context).terminate();
        }
    }
255477
def close(self):
        
        if self._Q is not None:
            for T in self._T:
                self._Q.interrupt()
            for n, T in enumerate(self._T):
                _log.debug('Join Context worker %d', n)
                T.join()
            _log.debug('Joined Context workers')
            self._Q, self._T = None, None
        super(Context, self).close()
732789
void close() {
    final ContextStop contextStop = new ContextStopImpl(this.identifier);
    for (final EventHandler<ContextStop> stopHandler : this.contextStopHandlers) {
      stopHandler.onNext(contextStop);
    }
  }
171754
void stop() {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
            Tr.event(tc, "Stopping the HPEL managed service");
        }
        // disconnect from the config admin
        this.configRef.unregister();
    }
158823
def shutdown(self):
        """"""
        self.stopped.set()

        if hasattr(self.api, "shutdown"):
            self.api.shutdown()

        for thread in self.thread.values():
            thread.join()
745365
def close(self):
        """"""
        super(ActorModelRunner, self).close()
        unsubscribe(handler=self.forward_prompt, predicate=self.is_prompt)
        if self.shutdown_on_close:
            self.shutdown()