docs: public void deleteMsgsWithNoReferences()
      {
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              SibTr.entry(tc, "deleteMsgsWithNoReferences");
  
          NonLockingCursor cursor = null;
          try {
              if (deleteMessageslock.tryLock(0, TimeUnit.SECONDS)) {
                  //trying with tryLock as incase if there is lock contention, then
                  //removeAllItemsWithNoRefCount() might have acquired lock. In that case we gracefully
                  // exit as the work is done by removeAllItemsWithNoRefCount()
                  LocalTransaction transaction = destinationHandler.getTxManager().createLocalTransaction(true);
  
                  // Remove any available messages that have no references
                  cursor = newNonLockingItemCursor(
                                  new ClassEqualsFilter(MessageItem.class));
  
                  MessageItem messageItem = (MessageItem) cursor.next();
  
                  while ((messageItem != null) && !HasToStop()) {
                      if (messageItem.getReferenceCount() == 0) {
                          try {
                              //The message is no longer required and can be deleted
                              messageItem.remove((Transaction) transaction, NO_LOCK_ID);
                          } catch (NotInMessageStore e) {
                              // No FFDC code needed
                              SibTr.exception(tc, e);
                              // It is possible that this item has just been removed, log and continue
                          }
                      }
                      messageItem = (MessageItem) cursor.next();
                  }
                  transaction.commit();
              }
          } catch (InterruptedException e) {
              // No FFDC code needed
              // code flow may never enter here as nobody would interrupt this thread
              // (may be in case if ME stopped in FORCE mode)
              SibTr.exception(tc, e);
          } catch (MessageStoreException e) {
              // MessageStoreException shouldn't occur so FFDC.
              FFDCFilter.processException(
                                          e,
                                          "com.ibm.ws.sib.processor.impl.store.itemstreams.PubSubMessageItemStream.deleteMsgsWithNoReferences",
                                          "1:244:1.71",
                                          this);
  
              SibTr.exception(tc, e);
  
              if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                  SibTr.exit(tc, "deleteMsgsWithNoReferences", e);
  
          } catch (SIException e) {
              //logging FFDC here itself and not propagating exception to the callers
              FFDCFilter.processException(
                                          e,
                                          "com.ibm.ws.sib.processor.impl.store.itemstreams.PubSubMessageItemStream.deleteMsgsWithNoReferences",
                                          "1:244:1.72",
                                          this);
  
              SibTr.exception(tc, e);
  
              if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                  SibTr.exit(tc, "deleteMsgsWithNoReferences", e);
          }
  
          finally
          {
              if (cursor != null)
                  cursor.finished();
  
              if (deleteMessageslock.getHoldCount() > 0)
                  deleteMessageslock.unlock(); //only unlock if it is acquired by this thread
          }
      }