包含以下5个部分:
1.Tools 工具:(CountDownLatch,CyclicBarrier,Semaphore,Executors,Exchange)
2.Lock :(ReentrantLock,Condition)
3.Atomic :(AtomicInteger,AtomicBoolean,AtomicReference。。。)
4.Collections:
阻塞队列(ArrayBlockingQueue)
ArrayList升级版(CopyOnWriteArrayList 读多写少场景)
HashSet,TreeSet升级版(CopyOnWriteArraySet,ConcurrentSkipListSet)
HashMap,TreeMap升级版(ConcurrentHashMap,ConcurrentSkipListMap)
5.Executor:
new FixedThreadPool :线程固定,无界缓冲队列,适用于任务数量不均匀,对内存压力不敏感的场景
new CacheThreadPool:不限线程数,适用于短时间要求低延迟的任务场景
new SingleThreadPool: 适用于异步执行顺序的场景
new ScheduleThreadPool:支持固定频率和固定延迟的场景
。。。。。待完善