code: private static synchronized int setId(Queue queue)
      {
          String queue_string = queue.toString();
          if (!queues.contains(queue_string))
              queues.add(queue_string);
          return queues.indexOf(queue_string);
      }
docs: Set the unique id for this Queue.