Method will be called for each UserRegistryService that is unregistered
in the OSGi service registry. We must remove this instance from our
internal map.

@param ref Reference to an unregistered UserRegistryService
509261
protected Map<String, Object> unsetUserRegistry(ServiceReference<UserRegistryService> ref) {
        userRegistry.removeReference((String) ref.getProperty(KEY_ID), ref);
        userRegistry.removeReference(String.valueOf(ref.getProperty(KEY_SERVICE_ID)), ref);

        // determine a new user registry service
        userRegistryService.set(null);
        return getServiceProperties();
    }
1188563
public void unregisterService(String serviceName, String providerId) {
        getServiceDirectoryClient().unregisterServiceInstance(serviceName, providerId);
        getCacheServiceInstances().remove(new ServiceInstanceToken(serviceName, providerId));
    }
630382
synchronized void removeHandler(ServiceReference<?> serviceReference) {
        HandlerHolder holder = serviceReferenceMap.remove(serviceReference);

        if (holder != null) {
            for (String topic : holder.getDiscreteTopics()) {
                removeTopicHandlerFromMap(topic, holder, discreteEventHandlers);
            }
            for (String topic : holder.getWildcardTopics()) {
                removeTopicHandlerFromMap(topic, holder, wildcardEventHandlers);
            }
        }

        // Clear the cache since it's no longer up to date
        clearTopicDataCache();
    }
1201319
public void registerComponentBindingsProvider(ServiceReference reference) {
		log.info("registerComponentBindingsProvider");
		log.info("Registering Component Bindings Provider {} - {}",
				new Object[] { reference.getProperty(Constants.SERVICE_ID),
						reference.getProperty(Constants.SERVICE_PID) });
		String[] resourceTypes = OsgiUtil.toStringArray(reference
				.getProperty(ComponentBindingsProvider.RESOURCE_TYPE_PROP),
				new String[0]);
		for (String resourceType : resourceTypes) {
			if (!this.containsKey(resourceType)) {
				put(resourceType, new HashSet<ServiceReference>());
			}
			log.debug("Adding to resource type {}", resourceType);
			get(resourceType).add(reference);
		}
	}
263947
def _unregister_service(self):
        
        if self._registration is not None:
            # Ignore error
            try:
                self._registration.unregister()
            except BundleException as ex:
                # Only log the error at this level
                logger = logging.getLogger(
                    "-".join((self._ipopo_instance.name, "ServiceRegistration"))
                )
                logger.error("Error unregistering a service: %s", ex)

            # Notify the component (even in case of error)
            self._ipopo_instance.safe_callback(
                ipopo_constants.IPOPO_CALLBACK_POST_UNREGISTRATION,
                self._svc_reference,
            )

            self._registration = None
            self._svc_reference = None
807439
protected void unsetUserTransaction(ServiceReference<UserTransaction> ref) {
        if (TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
            LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, "unsetUserTransaction", "unsetting " + ref);
        }
        userTransactionRef.unsetReference(ref);
    }
810016
protected void unsetBaseInstance(ServiceReference<ContextService> ref) {
        lock.writeLock().lock();
        try {
            threadContextConfigurations = null;
        } finally {
            lock.writeLock().unlock();
        }
    }
1267893
protected void unsetContextProvider(ServiceReference<JCAContextProvider> ref) {
        contextProviders.removeReference((String) ref.getProperty(JCAContextProvider.TYPE), ref);
    }
902394
protected synchronized void removeAdminObjectService(ServiceReference<AdminObjectService> reference) {
        String id = (String) reference.getProperty(ADMIN_OBJECT_CFG_ID);
        if (id != null) {
            removeAdminObjectService(reference, id, false);

            String jndiName = (String) reference.getProperty(ADMIN_OBJECT_CFG_JNDI_NAME);
            if (jndiName != null && !jndiName.equals(id)) {
                removeAdminObjectService(reference, jndiName, true);
            }
        }
    }
454064
protected void setUserTransaction(ServiceReference<UserTransaction> ref) {
        if (TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
            LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, "setUserTransaction", "setting " + ref);
        }
        userTransactionRef.setReference(ref);
    }
191008
@Override
    public void unregisterService(ServiceInstance<T> service) throws Exception
    {
        Entry<T> entry = services.remove(service.getId());
        internalUnregisterService(entry);
    }
263748
@Override
    public void removedService(ServiceReference<ManagedServiceFactory> reference, ManagedServiceFactory service) {
        String[] factoryPids = getServicePid(reference);

        if (factoryPids == null) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "removedService(): Invalid service.pid type: " + reference);
            }
            return;
        }

        synchronized (caFactory.getConfigurationStore()) {
            for (String pid : factoryPids) {
                remove(reference, pid);
            }
        }

        context.ungetService(reference);
    }
677755
public void markUnresolvable(EObject referenced) {
		if (!referenced.eIsProxy()) {
			throw new IllegalArgumentException("Cannot mark an instance as unresolvable if it is already resolved");
		}
		URI proxyURI = ((InternalEObject)referenced).eProxyURI();
		getUnresolvableURIFragments().add(proxyURI.fragment());
	}
1099
def unget_service(self, reference):
        # type: (ServiceReference) -> bool
        
        # Lose the dependency
        return self.__framework._registry.unget_service(
            self.__bundle, reference
        )
382681
public synchronized void unregisterJmxIfRequired() {
        referenceCount--;
        if (isRegistered == true && referenceCount <= 0) {
            JmxUtils.unregisterMbean(this.jmxObjectName);
            isRegistered = false;
        }
    }
1350418
protected void unsetResourceConfigFactory(ServiceReference<ResourceConfigFactory> ref) {
        if (TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
            LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, "unsetResourceConfigFactory", "unsetting " + ref);
        }
        resourceConfigFactoryRef.unsetReference(ref);
    }
1315079
@Reference(service = SerializationService.class)
    protected void setSerializationService(ServiceReference<SerializationService> ref) {
        serializationSvcRef.setReference(ref);
    }