thread43
来源:互联网 发布:2017陌陌站街营销软件 编辑:程序博客网 时间:2024/06/05 19:50
对于map(set)的使用如果不要求线程安全 HashMap TreeMap LinkedHashMap并发量小 Hashtable Collections.synchronizedXXX并发量大 ConcurrentHashMap // 高并发不涉及顺序 ConcurrentSkipListMap // 高并发考虑顺序对于队列使用不要求线程安全 ArrayList LinkedList并发量小 Collections.synchronizedXXX Vector CopyOnWrite并发量大 ConcurrentLinkedQueue 高并发同步 BlockingQueue 阻塞式队列 LinkedBlockingQueue 阻塞式无界消息队列 ArrayBlockingQueue 数组有界消息队列 DelayQueue 执行定时任务 LinkedTransferQueue SynchronizedQueue