docs: private void queueInternal(TransmissionDataIterator data,
                                ThrottlingPolicy throttlingPolicy,
                                boolean isTerminal)
     {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "queueInternal", data);
  
        boolean done = false;
        boolean releaseTransmission = false;
  
        int priority = data.getPriority();
        int size = data.getSize();
        Queue queue = null;
        while(!done)
        {
           ActivatableMonitor monitor = null;
  
           synchronized(queueMonitor)
           {
              if (state == CLOSED)
              {
                 // If we are closed - simply bin anything we are passed.
                 done = true;
              }
              else
              {
                 if (isTerminal) state = CLOSING;
  
                 if (queue == null)
                 {
                    // If data was assigned the special "lowest priority" value
                    // resolve this to an actual priority level.
                    if (priority == Conversation.PRIORITY_LOWEST)
                    {
                       int max = JFapChannelConstants.MAX_PRIORITY_LEVELS-1;
                       priority = 0;
                       while((priority < max) && (queueArray[priority].depth == 0)) ++priority;
                       data.setPriority(priority);
                       queue = queueArray[priority];
                    }
                    else
                    {
                       queue = queueArray[priority];
                    }
                 }
  
                 // If we are not allowed to perform throttling, or we have capacity,
                 // accept the data and queue it.
                 if ((throttlingPolicy == ThrottlingPolicy.DO_NOT_THROTTLE) ||
                     (queue.hasCapacity && (priority >= lowestPriorityWithCapacity)))
                 {
                    // Queue has capacity.  Enqueue the data.
                    queue.enqueue(data);                                  // D217401
                    queue.bytes += data.getSize();
                    ++ queue.depth;
                    ++ totalQueueDepth;
                    done = true;
  
                    // Decide if this has caused a change to the level of capacity we advertise.
                    if (queue.hasCapacity &&
                        ((queue.depth >= maxQueueDepth) || (queue.bytes >= maxQueueBytes)))
                    {
                       queue.hasCapacity = false;
  
                       // If the change in capacity has resulted in a change to the lowest level
                       // with priority - activate the monitors for the lower capacity level
                       if (priority >= lowestPriorityWithCapacity)
                       {
                          int newLowestPriorityWithCapacity = priority+1;
                          while (lowestPriorityWithCapacity < newLowestPriorityWithCapacity)
                          {
                             queueArray[lowestPriorityWithCapacity].monitor.setActive(true);
                             ++lowestPriorityWithCapacity;
                          }
                       }
                    }
                 }
                 else
                 {
                    // Queue does not have capacity.  Our action depends on the
                    // throttling policy.
                    if (throttlingPolicy == ThrottlingPolicy.BLOCK_THREAD)
                    {
                       // Block this thread until we have capacity
                       monitor = queue.monitor;
                    }
                    else if (throttlingPolicy == ThrottlingPolicy.DISCARD_TRANSMISSION)
                    {
                       // Don't queue the transmission - just return.
                       releaseTransmission = true;
                       done = true;
                    }
                 }
              }
           }
  
           if (monitor != null) monitor.waitOn();
        }
  
        if (releaseTransmission) data.release();
  
        if (type == Conversation.CLIENT)
           clientQueuedBytes += size;
        else
           meQueuedBytes += size;
  
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "queueInternal");
     }