code: public void addWorkUnit(WorkUnit workUnit, long weight) {
  
      WeightedMultiWorkUnit weightMultiWorkUnit;
  
      if (this.numMultiWorkUnits < this.maxMultiWorkUnits) {
        weightMultiWorkUnit = new WeightedMultiWorkUnit();
        this.numMultiWorkUnits++;
  
      } else {
  
        weightMultiWorkUnit = this.weightedWorkUnitQueue.poll();
      }
  
      weightMultiWorkUnit.addWorkUnit(weight, workUnit);
      this.weightedWorkUnitQueue.offer(weightMultiWorkUnit);
  
    }
docs: Adds a {@link WorkUnit} to this queue, along with an associated weight for that WorkUnit.