Removes a reference to the subscription.


@return The operation represented by the removal of the reference.
2550
int removeRef()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "removeRef");

    int ret = NOP;

    // If this is the last reference, then the operation is unsubscribe.

    if (--_refCount == 0)
      ret = UNSUBSCRIBE;

    checkRefCount();

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "removeRef", String.valueOf(ret) +":"+ String.valueOf(_refCount));

    return ret;
  }
202867
public boolean removeReference(K key, ServiceReference<V> reference) {
        if (key == null || reference == null)
            return false;
        ConcurrentServiceReferenceElement<V> element = new ConcurrentServiceReferenceElement<V>(referenceName, reference);
        return elementMap.remove(key, element);
    }
739347
public OperationFuture<Server> removePublicIp(Server serverRef) {
        checkNotNull(serverRef, "Server reference must be not null");
        ServerMetadata serverMetadata = findByRef(serverRef);

        List<JobFuture> jobFutures = serverMetadata.getDetails().getIpAddresses()
            .stream()
            .map(IpAddress::getPublicIp)
            .filter(notNull())
            .map(address -> removePublicIp(serverRef, address).jobFuture())
            .collect(toList());

        return new OperationFuture<>(
            serverRef,
            new ParallelJobsFuture(jobFutures)
        );
    }
1345678
public boolean releaseIfHolds(T referenced)
    {
        Ref ref = references.remove(referenced);
        if (ref != null)
            ref.release();
        return ref != null;
    }
1160168
private MembershipType removeMembershipType(Session session, String name, boolean broadcast)
      throws RepositoryException, Exception
   {
      Node membershipTypeNode = utils.getMembershipTypeNode(session, name);
      MembershipType type = readMembershipType(membershipTypeNode);

      if (broadcast)
      {
         preDelete(type);
      }

      removeMemberships(membershipTypeNode);
      membershipTypeNode.remove();
      session.save();

      removeFromCache(name);
      removeAllRelatedFromCache(name);

      if (broadcast)
      {
         postDelete(type);
      }

      return type;
   }
909617
public Subscription getSubscription(Reference reference) {
		return getResourceFactory().getApiResource(
				"/subscription/" + reference.toURLFragment(false)).get(
				Subscription.class);
	}
296038
public function removeOperation(OperationInterface $operation)
    {
        if ($this->operations->contains($operation)) {
            $this->operations->removeElement($operation);
        }

        return $this;
    }
1328377
public boolean unsubscribe() {
        CachingWeakRefSubscriber<T> subscriber = manager.get(tag);
        if (subscriber != null) {
            subscriber.unsubscribe();
            return true;
        }
        return false;
    }
856642
public Subscription cancelSubscription(final Subscription subscription) {
        return doPUT(Subscription.SUBSCRIPTION_RESOURCE + "/" + subscription.getUuid() + "/cancel",
                     subscription, Subscription.class);
    }
1035175
public <T> void destroy() {
        final Set<Entry<Bean<?>, Object>> beanSet = beanReferences.entrySet();
        final Iterator<Entry<Bean<?>, Object>> i = beanSet.iterator();
        Bean<?> bean;
        while (i.hasNext()) {
            bean = i.next().getKey();
            final T instance = (T) beanReferences.get(bean);

            destroyReference((Bean<T>) bean, instance);
        }

        beanReferences.clear();
    }
793244
public boolean remove()
    {
        boolean bSuccess = false;
        try   {
            if ((this.getEditMode() == Constants.EDIT_IN_PROGRESS)
                || (this.getEditMode() == Constants.EDIT_CURRENT))
                    this.getTable().remove();
        } catch (Exception ex)  {
            ex.printStackTrace();
            bSuccess = false;
        }
        return bSuccess;
    }
980694
public void unsubscribe(final Subscription subscription) {
        for (final ArrayList<Subscription> list : SUBSCRIPTION_MAP.values()) {
            list.remove(subscription);
        }
    }
666566
public boolean remove()
    {
        if (_last1.key() == null)
            throw new java.util.NoSuchElementException(
                                                      "remove() without calling next()");

        boolean result = internalRemove();

        return result;
    }
530205
def drop_callback_reference(self, subscription):
        
        if subscription not in self.__subscriptions:
            raise workflows.Error(
                "Attempting to drop callback reference for unknown subscription"
            )
        if not self.__subscriptions[subscription]["unsubscribed"]:
            raise workflows.Error(
                "Attempting to drop callback reference for live subscription"
            )
        del self.__subscriptions[subscription]
1255562
def remove(self):
        
        self.logger.debug('Remove subscription from server...')

        data = {
            'command': 'unsubscribe',
            'identifier': self._identifier_string()
        }

        self.connection.send(data)
        self.state = 'unsubscribed'
1311825
def unsubscribe(self, subscriber: 'Subscriber') -> None:
        
        # here is a special implementation which is replacing the more
        # obvious one: self._subscriptions.remove(subscriber) - this will not
        # work because list.remove(x) is doing comparision for equality.
        # Applied to publishers this will return another publisher instead of
        # a boolean result
        for i, _s in enumerate(self._subscriptions):
            if _s is subscriber:
                self._subscriptions.pop(i)
                return
        raise SubscriptionError('Subscriber is not registered')
288576
public function cancelOrderReference()
    {
        $cancelOrderReferenceRequest 
            = new OffAmazonPaymentsService_Model_CancelOrderReferenceRequest();
        $cancelOrderReferenceRequest->setSellerId($this->_sellerId);
        $cancelOrderReferenceRequest
            ->setAmazonOrderReferenceId($this->_amazonOrderReferenceId);
        
        return $this->_service->cancelOrderReference($cancelOrderReferenceRequest);
    }