9 线程池
9.1 newCachedThreadPool
9.2 newFixedThreadPool
9.3 newSingleThreadExecutor
看出是顺序执行的
9.4 newScheduledThreadPool
10 死锁
必要条件
互斥条件
请求和保持条件
不剥夺条件
环路等待条件
11 高并发之扩容思路
11.1 扩容
垂直扩容(纵向扩展) :提高系统部件能力
水平扩容(横向扩展) :增加更多系统成员来实现
11.1 扩容 - 数据库
读操作扩展: memcache、redis、 CDN等缓存
写操作扩展: Cassandra、Hbase等
12 高并发之缓存思路
12.1 缓存
1 缓存特征
命中率:命中数/(命中数+没有命中数)
最大元素(空间)
清空策略:FIFO,LFU,LRU,过期时间,随机等
2 缓存分类和应用场景
本地缓存:编程实现(成员变量、局部变量、静态变量)、Guava Cache
分布式缓存:Memcache、Redis
12.2 高并发之缓存-特征、场景及组件
1 Guava Cache
2 缓存 - Memchche
3 缓存 - Redis
12.3 redis的使用
- 配置类
- 服务类
















