/*
(non-Javadoc)

@see com.ibm.wsspi.sib.core.SICoreConnection#deleteDurableSubscription(java.lang.String, java.lang.String)
485940
@Override
    public void deleteDurableSubscription(String subscriptionName,
                                          String durableSubscriptionHome)

                    throws SIConnectionUnavailableException, SIConnectionDroppedException,
                    SIResourceException, SIConnectionLostException,
                    SIErrorException,
                    SINotAuthorizedException,
                    SIIncorrectCallException,
                    SIDurableSubscriptionNotFoundException,
                    SIDestinationLockedException
    {

        //liberty code change : chetan
        //Since there is no ME-ME communication the durableSubscriptionHome is always the local ME 
        durableSubscriptionHome = _messageProcessor.getMessagingEngineName();
        if (TraceComponent.isAnyTracingEnabled() && CoreSPIConnection.tc.isEntryEnabled())
            SibTr.entry(CoreSPIConnection.tc, "deleteDurableSubscription",
                        new Object[] { this, subscriptionName, durableSubscriptionHome });

        deleteDurableSubscription(subscriptionName, durableSubscriptionHome, null);

        if (TraceComponent.isAnyTracingEnabled() && CoreSPIConnection.tc.isEntryEnabled())
            SibTr.exit(CoreSPIConnection.tc, "deleteDurableSubscription");

    }
709991
public Subscription reactivateSubscription(final Subscription subscription) {
        return doPUT(Subscription.SUBSCRIPTION_RESOURCE + "/" + subscription.getUuid() + "/reactivate",
                     subscription, Subscription.class);
    }
1257773
function resumeSubscriptionDispatcher (
    topic, data, options, subscriptions, resolver, fulfill, reject
  ) {
    var
      promise = resolver.promise,

      subscription;

    for (
      ;
      resolver.i >= 0 && promise.pending < options.semaphor;
      resolver.i -= 1
    ) {
      subscription = subscriptions[resolver.i];
      if (!subscription.suspended) {
        promise.pending += 1;
        subscriptionInvoker(subscription, data, topic).then(fulfill, reject);
      }
    }
  }
434631
protected void resetDeleteSubscriptionMessage()
  {
    if (tc.isEntryEnabled())
      SibTr.entry(tc, "resetDeleteSubscriptionMessage");

    // Reset the state
    reset();

    // Indicate that this is a create message    
    iSubscriptionMessage.setSubscriptionMessageType(
      SubscriptionMessageType.DELETE);

    if (tc.isEntryEnabled())
      SibTr.exit(tc, "resetDeleteSubscriptionMessage");
  }
578445
@Override
    public void eventRestored() throws SevereMessageStoreException
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "eventRestored");
        super.eventRestored();
        // After a restart, if the referredItem is not obtained before a postCommit
        // then the item can not be obtained. Therefore we need to always obtain
        // the item (msgstore recreate their links in the following method).
        // Defect 302341
        getMessageItem();

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "eventRestored");
    }
251884
void setRequestedProxySubscriptionsResponded()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "setRequestedProxySubscriptionsResponded");

    synchronized (this)
    {
      iRequestSent = false;

      if (!iAlarmCancelled)
        iAlarm.cancel();

      iAlarmCancelled = true;
    }

    String meName = JsAdminUtils.getMENameByUuidForMessage(iMEUuid.toString());

    if (meName == null)
      meName = iMEUuid.toString();

    SibTr.push(iProxyHandler.getMessageProcessor().getMessagingEngine());
    SibTr.info(tc, "NEIGHBOUR_REPLY_RECIEVED_INFO_CWSIP0382",
               new Object[]{meName});
    SibTr.pop();

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "setRequestedProxySubscriptionsResponded");
  }
921710
public ProjectSubscriptionName deleteSubscription(String subscriptionId) throws Exception {
    // [START pubsub_delete_subscription]
    try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) {
      ProjectSubscriptionName subscriptionName =
          ProjectSubscriptionName.of(projectId, subscriptionId);
      subscriptionAdminClient.deleteSubscription(subscriptionName);
      return subscriptionName;
    }
    // [END pubsub_delete_subscription]
  }
635699
def deleteAllSubscriptions(self):
		'''
		
		'''
		result = asyncResult()
		data = self._deleteURL("/subscriptions/")
		if data.status_code == 204: #immediate success
			result.error = False
			result.is_done = True
		else:
			result.error = response_codes("unsubscribe",data.status_code)
			result.is_done = True
		result.raw_data = data.content
		result.status_code = data.status_code
		return result
746367
@Override
    public FilterMutableType removeDescription(final String value) throws IllegalArgumentException {
        // Precondition checks
        if (value == null || value.length() == 0) {
            throw new IllegalArgumentException("value must be specified");
        }

        // Get all "description" elements
        final List<Node> descriptions = this.getRootNode().get("description");
        if (descriptions != null) {
            // For each description
            for (final Node description : descriptions) {
                // If matches
                if (description.getText().equals(value)) {
                    // Remove
                    description.getParent().removeChild(description);
                    System.out.println(description);
                }
            }
        }

        // Return
        return this;
    }
591691
@Override
    public void setDurableSubscriptionHome(String value) throws JMSException {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "setDurableSubscriptionHome", value);
        jcaManagedConnectionFactory.setDurableSubscriptionHome(value);
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "setDurableSubscriptionHome");
    }
622211
@Override
    public void setShareDurableSubscriptions(
                                             final String shareDurableSubscriptions) {
        if (TraceComponent.isAnyTracingEnabled() && TRACE.isDebugEnabled()) {
            SibTr.debug(this, TRACE, "shareDurableSubscriptions",
                        shareDurableSubscriptions);
        }
        _shareDurableSubscriptions = shareDurableSubscriptions;
    }
1295190
protected void recoverSubscriptions(MultiMEProxyHandler proxyHandler) throws MessageStoreException, SIResourceException
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "recoverSubscriptions", proxyHandler);

    iProxyHandler = proxyHandler;

    iProxies = new Hashtable();

    NonLockingCursor cursor = null;
    try
    {
      cursor = newNonLockingItemCursor(new ClassEqualsFilter(MESubscription.class));

      AbstractItem item = null;
      while ((item = cursor.next()) != null)
      {
        MESubscription sub = null;
          sub = (MESubscription)item;

        // Generate a key for the topicSpace/topic
        final String key = BusGroup.subscriptionKey(sub.getTopicSpaceUuid(),
                                                       sub.getTopic());

        // Add the Neighbour into the list of recovered Neighbours
        iProxies.put(key, sub);

        // Having created the Proxy, need to readd the proxy to the matchspace or just reference it.
        iNeighbours.createProxy(this,
                                iDestinationManager.getDestinationInternal(sub.getTopicSpaceUuid(), false),
                                sub,
                                sub.getTopicSpaceUuid(),
                                sub.getTopic(),
                                true);

        // When recovering subscriptions, we need to call the event post commit
        // code to either add a reference, or put in the MatchSpace.
        sub.eventPostCommitAdd(null);

      }
    }
    finally
    {
      if (cursor != null)
        cursor.finished();
    }

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "recoverSubscriptions");
  }
262429
@RequirePOST
    @Restricted(DoNotUse.class)
    public synchronized void doSubmitDescription( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException {
        Jenkins.getInstance().checkPermission(Jenkins.ADMINISTER);

        setDescription(req.getParameter("description"));
        rsp.sendRedirect(".");  // go to the top page
    }
1258235
@Override
    public void setShareDurableSubscriptions(String sharePolicy) throws JMSException {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "setShareDurableSubscriptions", sharePolicy);

        // First of all, convert null and empty to mean the default.
        if ((sharePolicy == null) || ("".equals(sharePolicy))) {
            jcaManagedConnectionFactory.setShareDurableSubscriptions(ApiJmsConstants.SHARED_DSUBS_NEVER);
        }
        // Then check for another legal value
        else if ((ApiJmsConstants.SHARED_DSUBS_IN_CLUSTER.equals(sharePolicy)) ||
                 (ApiJmsConstants.SHARED_DSUBS_ALWAYS.equals(sharePolicy)) ||
                 (ApiJmsConstants.SHARED_DSUBS_NEVER.equals(sharePolicy))) {
            jcaManagedConnectionFactory.setShareDurableSubscriptions(sharePolicy);
        }
        else {
            // This is not a legal value.
            throw (JMSException) JmsErrorUtils.newThrowable(
                                                            JMSException.class,
                                                            "INVALID_VALUE_CWSIA0261",
                                                            new Object[] { "shareDurableSubscriptions", sharePolicy },
                                                            tc
                            );
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "setShareDurableSubscriptions");
    }
959051
function disposeSubscription(component) {
  if (defined(component.__observeModelChangeSubscriptions)) {
    for (
      let i = 0;
      i < component.__observeModelChangeSubscriptions.length;
      ++i
    ) {
      component.__observeModelChangeSubscriptions[i].dispose();
    }
    component.__observeModelChangeSubscriptions = undefined;
  }
}
1211075
public synchronized int getNonDurableSubscriptions()
  {
    if (tc.isEntryEnabled())
      SibTr.entry(tc, "getNonDurableSubscriptions");

    if (tc.isEntryEnabled())
      SibTr.exit(
        tc,
        "getNonDurableSubscriptions",
        new Integer(nonDurableSubscriptions));

    return nonDurableSubscriptions;
  }
376881
private void terminateSubscriptions(IoSession session, Subscription.CloseReason reason) {
        Multiset<String> heapsForThisClient;
        try {
            subTermLock.lock();
            heapsForThisClient = heapsByClient.remove(session);
        } finally {
            subTermLock.unlock();
        }

        if (heapsForThisClient != null) {
            for (String s : heapsForThisClient.keySet()) {
                terminateSubscriptions(session, s, reason);
            }
        }
    }