Versions Compared

Key

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

...

设计VectorLastCacheValue,存储多元时间序列的lastCache;由于目前last查找是查找最新的不为空值的时间点,故不同分量的LastCache时间可能不同,需要存储多个timestamp和 TsPrimitiveValue。

所有针对多元序列的last cache操作均需提供目标分量的全路径

ILastCacheContainer提供基于分量Index的lastCache操作接口,该index与VectorMeasurementSchema中的分量index相一致。ILastCacheContainer提供基于分量Index的lastCache操作接口,该index与vector schema中的分量index相一致。

2. 类设计


类名

职责

StorageGroupProccessor

与MManager进行交互,在数据插入、数据删除以及上传新tsfile的时候清空对应序列的lastCache

LastQueryExecutor

Last查询执行类,调用MManager进行lastCache操作

MManager

  1. 对IoTDB的其他模块提供lastCache的操作接口
  2. 为LastCacheManager提供node查找功能

IEntityMNode与EntityMNode

实体节点,存储由物理量模板所表示的时间序列的lastCache,即Map<String, ILastCacheContainer>

IMeasurementMNode与MeasurementMNode

物理量节点,手动创建时间序列时产生,存储其表示的时间序列的lastCache

LastCacheManager

封装所有的lastCache处理逻辑,并向mmanager提供lastCache操作接口

ILastCacheContainer

最新点缓存项接口,声明最新点缓存的操作接口,该接口未来可向多条value缓存扩展

LastCacheContainer

实现ILastCacheContainer,定义对于一个最新点缓存值的基本操作

ILastCacheValue

最新点缓存值接口,声明

UnaryLastCacheValue

一元序列的最新点缓存值

VectorLastCacheValue

多元序列的最新点缓存值,存储各分量对应的最新点的时间戳与数值

...