code: private WeightedQueue getWeightedQueue(String id)
      {
          WeightedQueue weightedQueue = queues.get(id);
          if (weightedQueue != null)
              // queue existed
              return weightedQueue;
  
          WeightedQueue maybenew = new WeightedQueue(id, getWeight(id));
          weightedQueue = queues.putIfAbsent(id, maybenew);
          if (weightedQueue == null)
          {
              // created new queue: register for monitoring
              maybenew.register();
              return maybenew;
          }
  
          // another thread created the queue
          return weightedQueue;
      }
docs: /*
  Get the Queue for the respective id, if one is not available
  create a new queue for that corresponding id and return it