Disables a reference to the service

        :return: True if the bundle was using this reference, else False
1099
def unget_service(self, reference):
        # type: (ServiceReference) -> bool
        
        # Lose the dependency
        return self.__framework._registry.unget_service(
            self.__bundle, reference
        )
1232002
public boolean hasApplicationContext() {
        String filter = getApplicationContextFilter(bundleContext.getBundle().getSymbolicName());
        ServiceReference<?>[] references = null;
        try {
            references = bundleContext.getServiceReferences(getContainerClass().getName(), filter);
        } catch (InvalidSyntaxException e) {
            throw new IllegalStateException("not possible", e);
        }
        return references != null && references.length != 0;
    }
836903
def unbind(self, dependency, svc, svc_ref):
        # type: (Any, Any, ServiceReference) -> None
        
        with self._lock:
            # Invalidate first (if needed)
            self.check_lifecycle()

            # Call unbind() and remove the injection
            self.__unset_binding(dependency, svc, svc_ref)

            # Try a new configuration
            if self.update_bindings():
                self.check_lifecycle()
981711
@Override
    public boolean shutdownService(Object service, BundleContext context)
    {
        for (String alias : getAliases())
        {
            HttpServiceTracker serviceTracker = getServiceTracker(context, BaseWebappServlet.ALIAS, alias);
            if (serviceTracker != null)
                serviceTracker.close();
        }
        return true;
    }
1146560
def _stop(self):
        
        # Running flag down
        self.running = False

        # Unregister the service listener
        self.__context.remove_service_listener(self)

        # Clean up handler factories usages
        with self.__instances_lock:
            for svc_ref in self._handlers_refs:
                self.__context.unget_service(svc_ref)

            self._handlers.clear()
            self._handlers_refs.clear()
982210
private synchronized void disableDeferredReferenceData() {
        deferredReferenceDataEnabled = false;
        if (parent != null && deferredReferenceDatas != null) {
            parent.removeDeferredReferenceData(this);
            deferredReferenceDatas = null;
        }
    }
675449
def unregister_service(self, registration):
        # type: (ServiceRegistration) -> bool
        
        # Get the Service Reference
        reference = registration.get_reference()

        # Remove the service from the registry
        svc_instance = self._registry.unregister(reference)

        # Keep a track of the unregistering reference
        self.__unregistering_services[reference] = svc_instance

        # Call the listeners
        event = ServiceEvent(ServiceEvent.UNREGISTERING, reference)
        self._dispatcher.fire_service_event(event)

        # Update the bundle registration information
        bundle = reference.get_bundle()
        bundle._unregistered_service(registration)

        # Remove the unregistering reference
        del self.__unregistering_services[reference]
        return True
313943
def disable_service_freshness_checks(self):
        
        if self.my_conf.check_service_freshness:
            self.my_conf.modified_attributes |= \
                DICT_MODATTR["MODATTR_FRESHNESS_CHECKS_ENABLED"].value
            self.my_conf.check_service_freshness = False
            self.my_conf.explode_global_conf()
            self.daemon.update_program_status()
1053461
def disable_service(conn, service='ceph'):
    
    if is_systemd(conn):
        # Without the check, an error is raised trying to disable an
        # already disabled service
        if is_systemd_service_enabled(conn, service):
            remoto.process.run(
                conn,
                [
                    'systemctl',
                    'disable',
                    '{service}'.format(service=service),
                ]
            )
1227070
def enable_disable(self):
        
        if self.enabled:
            self.update(enabled=False)
        else:
            self.update(enabled=True)
808611
def _disable(self):
        
        self.total_time += time() - self.enabled_start
        self.enabled_start = None
        del self.stack
1063603
@Trivial
    public void unsetSslSupport(ServiceReference<ChannelFactoryProvider> ref) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
            Tr.entry(this, tc, "unsetSslSupport", new Object[] { ref.getProperty("type"), ref });
        }
        // see if its for the same service ref, if yes then destroy
        if (_sslFactoryProvider.getReference() == ref)
        {
            if (_isSSLChain) {
                if (_isChainStarted)
                    performAction(destroyChainAction);
            }

        }
        if (_sslFactoryProvider.unsetReference(ref)) {
            _isSSLEnabled = false;
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.exit(tc, "unsetSslSupport", _isSSLEnabled);
        }

    }
261853
def unused_by(self, bundle):
        
        if bundle is None or bundle is self.__bundle:
            # Ignore
            return

        with self.__usage_lock:
            try:
                if not self.__using_bundles[bundle].dec():
                    # This bundle has cleaner all of its usages of this
                    # reference
                    del self.__using_bundles[bundle]
            except KeyError:
                # Ignore error
                pass
790461
def __unset_binding(self, dependency, service, reference):
        # type: (Any, Any, ServiceReference) -> None
        
        # Call the component back
        self.__safe_field_callback(
            dependency.get_field(),
            constants.IPOPO_CALLBACK_UNBIND_FIELD,
            service,
            reference,
        )

        self.safe_callback(constants.IPOPO_CALLBACK_UNBIND, service, reference)

        # Update the injected field
        setattr(self.instance, dependency.get_field(), dependency.get_value())

        # Unget the service
        self.bundle_context.unget_service(reference)
1338086
def service_disable(s_name, s_delay=None, **connection_args):
    '''
    
    '''
    ret = True
    service = _service_get(s_name, **connection_args)
    if service is None:
        return False
    if s_delay is not None:
        service.set_delay(s_delay)
    nitro = _connect(**connection_args)
    if nitro is None:
        return False
    try:
        NSService.disable(nitro, service)
    except NSNitroError as error:
        log.debug('netscaler module error - NSService.enable() failed: %s', error)
        ret = False
    _disconnect(nitro)
    return ret
458817
public function disable()
    {
        $path = $this->getStatusFilePath();
        if ($path && file_exists($path)) {
            return (bool) unlink($path);
        }
        return false;
    }
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;
    }