code: public boolean removeAllItemsWithNoRefCount(Transaction tran) throws SIResourceException
      {
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              SibTr.entry(tc, "removeAllItemsWithNoRefCount", tran);
  
          Item item = null;
  
          boolean deletedItems = false;
  
          try
          {
              deleteMessageslock.lockInterruptibly();
              /*
               * Loop through all the items and check if they have any reference count.
               * 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
               */
              while (null != (item = findFirstMatchingItem(new DeliveryDelayDeleteFilter())))
              {
                  try
                  {
                      if (item.getReferenceCount() == 0)
                      {
                          item.remove(tran, NO_LOCK_ID);
  
                          deletedItems = true;
                      }
                  } catch (NotInMessageStore e)
                  {
                      // No FFDC code needed
                      SibTr.exception(tc, e);
  
                      // It is possible that this item has just been removed, log and continue
                  }
              }
          } catch (InterruptedException e) {
              // No FFDC code needed
              // code flow may never enter here as nobody would interrupt this thread.
              // aborb interrrput and trace it.
              SibTr.exception(tc, e);
  
          } catch (MessageStoreException e)
          {
              // // FFDC
              FFDCFilter
                              .processException(
                                                e,
                                                "com.ibm.ws.sib.processor.impl.store.itemstreams.PubSubMessageItemStream.removeAllItemsWithNoRefCount",
                                                "1:840:1.74", this);
  
              if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                  SibTr.exit(tc, "removeAllItemsWithNoRefCount", "SIResourceException");
              throw new SIResourceException(e);
          }
  
          finally {
              deleteMessageslock.unlock();
          }
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              SibTr.exit(tc, "removeAllItemsWithNoRefCount", Boolean.valueOf(deletedItems));
          return deletedItems;
      }
docs: Remove all the message items
  
  @throws SIResourceException