ConcurrentLinkedQueue
If you don’t care about having index-based access and just want the insertion-order-preserving characteristics of a List, you could consider a java.util.concurrent.ConcurrentLinkedQueue. Since it implements Iterable, once you’ve finished adding all the items, you can loop over the contents using the enhanced for syntax:
Queue
//Multiple threads can safely call globalQueue.add()…
for (String href : globalQueue) {
//do something with href
}
There is a concurrent list implementation in java.util.concurrent. CopyOnWriteArrayList in particular.