ThreadLocal 源码
set Thread currentThread map(Thread ,person) 设到了当前线程的map
ThreadLocal 用途
-声明式事务 保证同一个Connection
强 软 弱 虚 引用
vector hashtable 基本不用
map hashMap treeMap (红黑树 排好序的)
ThreadLocal 源码
set Thread currentThread map(Thread ,person) 设到了当前线程的map
ThreadLocal 用途
-声明式事务 保证同一个Connection
强 软 弱 虚 引用
vector hashtable 基本不用
map hashMap treeMap (红黑树 排好序的)