摘要: 1)读不加锁,写加锁。 2)Copy-On-Write:写时拷贝。 3)保证最终一致性,不保证实时一致性。 4)尽量批量添加(删除):减少Copy、减少GC。 5)适用场景:读多写少。 阅读全文
posted @ 2017-12-23 23:32 Uncle_Bjorney 阅读(109) 评论(0) 推荐(0) 编辑
摘要: 1. getByName 1)InetAddress.Cache 2)getCachedAddresses 3)getAddressesFromNameService 2. getByAddress getByName会立刻请求解析域名为IP地址,而getByAddress不会立刻请求解析IP地址为 阅读全文
posted @ 2017-12-23 14:41 Uncle_Bjorney 阅读(3387) 评论(0) 推荐(0) 编辑