Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

4. LastCache方案详情

4.1. 设计思路

  1. 为了提升功能代码的内聚性,将LastCache功能与MNode解耦,设计ILastCacheEntry接口,由LasCacheEntry进行实现并封装lastCache数据,同时提供简单的lastCacheValue操作为了提升功能代码的内聚性,通过设计ILastCacheEntry接口,将LastCache操作与MNode解耦,由LasCacheEntry实现ILastCacheEntry接口,并封装lastCache数据,同时提供简单的lastCacheValue操作。
  2. 新建LastCacheManager,将MManager中与lastCache相关的操作代码尽可能迁移至 LastCacheManager,MManager中仅保留必要的mtree调用以及mnode获取操作。
  3. EntityMNode中增加Map<String, ILastCacheEntry>字段,用于存储template中序列的lastCache;MeasurementMNode中将原来的TimeValuePair替换为ILastCacheEntry,用于存储普通序列的lastCache。

...