1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
| list 单线程 ArrayList LinkedList 多线程 synchronized Vector Stack CopyOnWriteArrayList lock 无 queue 单线程: 非阻塞: PriorityQueue 并发: 非阻塞: 无界: ConcurrentLinkedQueue(cas)(linked) 阻塞:BlockingQueue 可选边界: LinkedBlockingQueue(lock)(linked) 有界: ArrayBlockingQueue(lock)(array) 无界: LinkedTransferQueue(fifo)(cas)(linked) PriorityBlockingQueue(lock)(array) DelayQueue(lock)(PriorityQueue) 单个: SynchronousQueue(cas)
Deque BlockingDeque set 单线程: 乱序: HashSet 顺序: LinkedHashed(添加) TreeSet(红黑树的排序的key) 并发: lock ConcurrentSkipListSet synchronize CopyOnWriteArraySet
|