docs: public void removeAllAvailableReferences() throws SIResourceException
      {
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              SibTr.entry(tc, "removeAllAvailableReferences");
  
          LocalTransaction transaction = null;
          ItemReference itemReference = null;
  
          try
          {
              // Get the transaction manager for the message processor
              PubSubMessageItemStream mis = (PubSubMessageItemStream) getItemStream();
              DestinationHandler dh = (DestinationHandler) mis.getItemStream();
              SIMPTransactionManager txManager = dh.getTxManager();
  
              removingAvailableReferences = true;
  
              if (txManager != null)
              {
                  /* Create new transaction */
                  transaction = txManager.createLocalTransaction(true);
                  int countOfItems = 0;
  
                  //Remove all the references in batches to avoid large UOWs in the msgstore
                  do
                  {
                      do
                      {
                          /*
                           * Introduce a new DeliveryDelayDeleteFilter which basically retrieves
                           * the messages which are either available or which are locked
                           * for delivery delay It is just a marker class.Earlier to
                           * delivery delay feature null was being passed
                           */
                          itemReference = this.removeFirstMatching(new DeliveryDelayDeleteFilter(), (Transaction) transaction);
                          if (itemReference != null)
                              countOfItems++;
  
                      } while ((itemReference != null) && (countOfItems < BATCH_DELETE_SIZE));
  
                      //Commit the batch
                      if (countOfItems > 0)
                      {
                          transaction.commit();
  
                          /* Create new transaction */
                          if (itemReference != null)
                          {
                              transaction = txManager.createLocalTransaction(true);
                          }
  
                          countOfItems = 0;
                      }
  
                  } while (itemReference != null);
              }
          } catch (MessageStoreException e)
          {
              FFDCFilter.processException(
                                          e,
                                          "com.ibm.ws.sib.processor.impl.store.itemstreams.SubscriptionItemStream.removeAllAvailableReferences",
                                          "1:509:1.54",
                                          this);
  
              SibTr.exception(tc, e);
              SibTr.error(tc, "INTERNAL_MESSAGING_ERROR_CWSIP0002",
                          new Object[] {
                                        "com.ibm.ws.sib.processor.impl.store.itemstreams.SubscriptionItemStream",
                                        "1:516:1.54",
                                        e });
  
              if (transaction != null)
                  handleRollback(transaction);
  
              if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                  SibTr.exit(tc, "removeAllAvailableReferences");
  
              throw new SIResourceException(
                              nls.getFormattedMessage(
                                                      "INTERNAL_MESSAGING_ERROR_CWSIP0002",
                                                      new Object[] {
                                                                    "com.ibm.ws.sib.processor.impl.store.itemstreams.SubscriptionItemStream",
                                                                    "1:530:1.54",
                                                                    e },
                                                      null),
                              e);
          } catch (SIException e)
          {
              FFDCFilter.processException(
                                          e,
                                          "com.ibm.ws.sib.processor.impl.store.itemstreams.SubscriptionItemStream.removeAllAvailableReferences",
                                          "1:540:1.54",
                                          this);
  
              SibTr.exception(tc, e);
              SibTr.error(tc, "INTERNAL_MESSAGING_ERROR_CWSIP0002",
                          new Object[] {
                                        "com.ibm.ws.sib.processor.impl.store.itemstreams.SubscriptionItemStream",
                                        "1:547:1.54",
                                        e });
  
              if (transaction != null)
                  handleRollback(transaction);
  
              if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                  SibTr.exit(tc, "removeAllAvailableReferences");
  
              throw new SIResourceException(
                              nls.getFormattedMessage(
                                                      "INTERNAL_MESSAGING_ERROR_CWSIP0002",
                                                      new Object[] {
                                                                    "com.ibm.ws.sib.processor.impl.store.itemstreams.SubscriptionItemStream",
                                                                    "1:561:1.54",
                                                                    e },
                                                      null),
                              e);
          }
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              SibTr.exit(tc, "removeAllAvailableReferences");
      }