翻译自Google Guava Cache This Post is a continuation of my series on Google Guava, this time covering Guava Cache. Guava Cache offers more flexibility and power than either a HashMap or ConcurrentHashMap, but is not as heavy as using EHCache or Memcache…
原文链接 译文连接 译者:沈义扬 传统上,Java的进程内事件分发都是通过发布者和订阅者之间的显式注册实现的.设计EventBus就是为了取代这种显示注册方式,使组件间有了更好的解耦.EventBus不是通用型的发布-订阅实现,不适用于进程间通信. 范例 01 // Class is typically registered by the container. 02 class EventBusChangeRecorder { 03 @Subscribe public void recordCu…