docs: public SIMPMessage getMessageLocked() throws MessageStoreException {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        SibTr.entry(tc, "getMessageLocked");
      
      SIMPMessage msg = null;
      
      if(classifyingMessages)
      {
        // Take the classifications read lock
        consumerSet.takeClassificationReadLock();
  
        // Classifications may change dynamically, so check the pendingReset
        // flag under this lock. If classifications have changed then we'll
        // set up the filters again
        if(pendingFlowReset)
        {
          pendingFlowReset = false;
          resetFlowProperties();
        }
          
        // Determine which cursor to use. chooseGetCursorIndex() will 
        // randomly choose an index if XD has specified weightings.
        // The method can be called more than once. This supports the situation
        // where we've looked for but not found any messages of a particular 
        // classification. 
        // 
        // If chooseGetCursorIndex() returns 0, then either no classifications were 
        // specified or we've already tried all the classifications. An index
        // of 0 leads to the use of the default (unclassified) cursor.
        int classIndex = -1;
        while(classIndex != 0)
        {
          classIndex = chooseGetCursorIndex(classIndex);
       
          // Always use the cursor straight from the key
          msg = getMessageLocked(classIndex);
  
          if(msg != null)
            classIndex = 0;
        }
  
        // Free the classifications read lock
        consumerSet.freeClassificationReadLock();
      }
      else // Not classifying
      {
        // Use the zeroth index
        msg = getMessageLocked(0);
      }
  
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        SibTr.exit(tc, "getMessageLocked", msg);
  
      return msg;
    }