Stop all {@link ContextAwareReporter}s managed by the {@link RootMetricContext}.
189168
public void stopReporting() {
    this.reportingStarted = false;
    for (ContextAwareReporter reporter : this.reporters) {
      try {
        reporter.stop();
      } catch (Throwable throwable) {
        log.error(String.format("Failed to stop reporter with class %s", reporter.getClass().getCanonicalName()),
            throwable);
      }
    }
  }
1149660
public static synchronized void stopSinks() {
    if (sSinks != null) {
      for (Sink sink : sSinks) {
        sink.stop();
      }
    }
    sSinks = null;
  }
641739
@Override
    public void stop() {
        if(enabled) {
            metricPublishing.stop();
        }
        if(startUpMetric != null) {
            startUpMetric.stop();
        }
        super.stop();
    }
1350715
@Deactivate
    protected void deactivate(ComponentContext context) {
        SibTr.entry(tc, CLASS_NAME + "deactivate", context);

        runtimeSecurityService.modifyMessagingServices(null);
        queuePermissions = null;
        topicPermissions = null;
        temporaryDestinationPermissions = null;
        sibAuthenticationService = null;
        sibAuthorizationService = null;
        this.bundleLocation = null;
        
        SibTr.exit(tc, CLASS_NAME + "deactivate");
    }
926521
@Override
    public void stop(StopContext context) {
        this.config = null;
        SecurityActions.undefineContainerConfiguration(this.getCacheContainer(), this.name);
        log.debugf("%s cache configuration stopped", this.name);
    }
1024815
public static synchronized void disable() {
        if (!enabled) {
            return;
        }
        RxJavaPlugins.setOnObservableAssembly(oldOnObservableAssembly);
        oldOnObservableAssembly = null;
        RxJavaPlugins.setOnConnectableObservableAssembly(oldOnConnectableObservableAssembly);
        oldOnConnectableObservableAssembly = null;
        RxJavaPlugins.setOnCompletableAssembly(oldOnCompletableAssembly);
        oldOnCompletableAssembly = null;
        RxJavaPlugins.setOnSingleAssembly(oldOnSingleAssembly);
        oldOnSingleAssembly = null;
        RxJavaPlugins.setOnMaybeAssembly(oldOnMaybeAssembly);
        oldOnMaybeAssembly = null;
        RxJavaPlugins.setOnFlowableAssembly(oldOnFlowableAssembly);
        oldOnFlowableAssembly = null;
        RxJavaPlugins.setOnConnectableFlowableAssembly(oldOnConnectableFlowableAssembly);
        oldOnConnectableFlowableAssembly = null;
        RxJavaPlugins.setOnParallelAssembly(oldOnParallelAssembly);
        oldOnParallelAssembly = null;
        enabled = false;
    }
1107645
public void disable() {
        if (disabled) {
            return;
        }
        disabled = true;
        try {
            for (Region region : regions) {
                beaconManager.stopMonitoringBeaconsInRegion(region);
            }
        } catch (RemoteException e) {
            LogManager.e(e, TAG, "Can't stop bootstrap regions");
        }
        beaconManager.unbind(beaconConsumer);
    }
1227780
public void stop()
    {
        // Invalidate all sessions to cause unbind events
        ArrayList sessions = new ArrayList(_sessions.values());
        for (Iterator i = sessions.iterator(); i.hasNext(); )
        {
            Session session = (Session)i.next();
            session.invalidate();
        }
        _sessions.clear();
        
        // stop the scavenger
        SessionScavenger scavenger = _scavenger;
        _scavenger=null;
        if (scavenger!=null)
            scavenger.interrupt();
    }
985910
void stop() {
        try {
            dm.stop(getBundleContext());
        } catch (DirectoryMonitoringException e) {
            LOG.error("Failed to stop " + DirectoryMonitor.class.getName() + " for the directory " + monitoredDirectory, e);
        }
        declarationsFiles.clear();
        declarationRegistrationManager.unregisterAll();
    }
403634
public final void stop()
    {
        m_stopping = true;

        ImmutableMap<URI, AbstractImporter> oldReference;
        boolean success = false;
        do { // onChange also could set m_importers. Use while loop to pick up latest ref
            oldReference = m_importers.get();
            success = m_importers.compareAndSet(oldReference, ImmutableMap.<URI, AbstractImporter> of());
        } while (!success);

        if (!m_starting.get()) return;

        stopImporters(oldReference.values());
        if (!m_factory.isImporterRunEveryWhere()) {
            m_distributer.registerChannels(m_distributerDesignation, Collections.<URI> emptySet());
            m_distributer.unregisterCallback(m_distributerDesignation);
        }

        if (m_executorService == null) {
            return;
        }

        //graceful shutdown to allow importers to properly process post shutdown tasks.
        m_executorService.shutdown();
        try {
            m_executorService.awaitTermination(60, TimeUnit.SECONDS);
            m_executorService = null;
        } catch (InterruptedException ex) {
            //Should never come here.
            s_logger.warn("Unexpected interrupted exception waiting for " + m_factory.getTypeName() + " to shutdown", ex);
        }
    }
230854
@Override
    public boolean stop() {
        synchronized(MetricCollectorSupport.class) {
            if (uploaderThread != null) {
                uploaderThread.cancel();
                uploaderThread.interrupt();
                uploaderThread = null;
                if (singleton == this) { // defensive check
                    singleton = null;
                }
                return true;
            }
        }
        return false;
    }
725529
@Deactivate
    protected void deactivate(ComponentContext context) {
        lock.writeLock().lock();
        try {
            componentContext = null;
            properties = null;
            threadContextConfigurations = null;
        } finally {
            lock.writeLock().unlock();
        }
    }
336330
@Override
    public synchronized void stop(final StopContext context) {
        httpManagementConsumer.accept(null);
        ListenerRegistry lr = listenerRegistrySupplier.get();
        if(lr != null) {
            lr.removeListener(HTTP_MANAGEMENT);
            lr.removeListener(HTTPS_MANAGEMENT);
        }
        if (serverManagement != null) {
            try {
                serverManagement.stop();
            } finally {
                serverManagement = null;

                // Unregister sockets from the SBM
                if (socketBindingManager != null) {
                    ManagedBindingRegistry registry = useUnmanagedBindings ? socketBindingManager.getUnnamedRegistry() : socketBindingManager.getNamedRegistry();
                    if (basicManagedBinding != null) {
                        registry.unregisterBinding(basicManagedBinding);
                        basicManagedBinding = null;
                    }
                    if (secureManagedBinding != null) {
                        registry.unregisterBinding(secureManagedBinding);
                        secureManagedBinding = null;
                    }
                    socketBindingManager = null;
                    useUnmanagedBindings = false;
                }
            }
        }
    }
853368
public void endContextClassLoader(ClassLoader raClassLoader, ClassLoader previousClassLoader) {
        if (raClassLoader != null) {
            AccessController.doPrivileged(new GetAndSetContextClassLoader(previousClassLoader));
        }
    }
77138
protected void deactivate(ComponentContext context) {
        transactionInflowManagerRef.deactivate(context);

        // TODO remove the following temporary code once the transaction manager provides a proper mechanism to prevent a transaction on multiple threads at once
        SuspendCount suspendCount = suspendCountRef.get();
        if (suspendCount != null)
            ((UOWCurrent) transactionManager).unsetUOWEventListener(suspendCount);
    }
1269231
public void stop() {
        if (!Utils.isNullOrEmpty(context.getSettings().getExportFile())) {
            if (Utils.isNullOrEmpty(context.getSettings().getExportFilter())) {
                JAXB.marshal(export, new File(context.getSettings().getExportFile()));
            } else {
                Symbols exportFiltered = new Symbols();
                Pattern regexp = Pattern.compile(context.getSettings().getExportFilter());
                for (String symbol : export.getSymbols()) {
                    if (regexp.matcher(symbol).matches()) {
                        exportFiltered.getSymbols().add(symbol);
                    }
                }
                JAXB.marshal(exportFiltered, new File(context.getSettings().getExportFile()));
            }
        }
        if (context.getSettings().isClean()) {
            for (File file : oldFiles) {
                logInfo("deleting " + file.getName());
                if (!file.delete()) {
                    logInfo("failed");
                }
                ++deleted;
            }
        }
        try {
            final BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(java4cppHash));
            newHashes.store(out, "Generated by java4cpp");
            out.close();
        } catch (IOException e) {
            throw new RuntimeException("Failed to generate java4cpp.hash " + e.getMessage());
        }
        logInfo(String.format("generated: %d, imported: %d, skipped: %d, deleted: %d", generated, imported, skipped, deleted));
    }
1245186
protected synchronized void releaseBeanContextResources() {

        for (Class serviceClass : _serviceProviders.keySet()) {
            ServiceProvider sp = _serviceProviders.get(serviceClass);
            if (sp.isDelegated()) {
                sp.revoke(new BeanContextServiceRevokedEvent((BeanContextServices)getPeer(), serviceClass, true));
            }
        }
    }