code: public SeqnoList getMissing(int max_msgs) {
          lock.lock();
          try {
              if(size == 0)
                  return null;
              long start_seqno=getHighestDeliverable() +1;
              int capacity=(int)(hr - start_seqno);
              int max_size=max_msgs > 0? Math.min(max_msgs, capacity) : capacity;
              if(max_size <= 0)
                  return null;
              Missing missing=new Missing(start_seqno, max_size);
              long to=max_size > 0? Math.min(start_seqno + max_size-1, hr-1) : hr-1;
              forEach(start_seqno, to, missing);
              return missing.getMissingElements();
          }
          finally {
              lock.unlock();
          }
      }
docs: Returns a list of missing messages
  @param max_msgs If > 0, the max number of missing messages to be returned (oldest first), else no limit
  @return A SeqnoList of missing messages, or null if no messages are missing