Thread-safe Collection
Synchronized Collection
List list = Collections.synchronizedList(new ArrayList());
Set set = Collections.synchronizedSet(new HashSet());
Map map = Collections.synchronizedMap(new HashMap());List list = Collections.synchronizedList(new ArrayList());
synchronized (list) {
Iterator i = list.iterator();
while (i.hasNext())
foo(i.next());
}Concurrency Collection

List

Map
ConcurrentHashMap
ConcurrentSkipListMap

Set
Queue
阻塞与非阻塞
单端与双端
单端阻塞队列
双端阻塞队列
单端非阻塞队列
双端非阻塞队列
Last updated
