You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
64 lines
2.0 KiB
64 lines
2.0 KiB
@startuml
|
|
'https://plantuml.com/sequence-diagram
|
|
|
|
participant Events as event
|
|
participant DataTransferListener as entrance
|
|
participant TsKvEventServiceImpl as eventSvc
|
|
participant TsKvService as tskvSvc
|
|
participant 其他服务或监听器 as os
|
|
|
|
== 事件统一入口 ==
|
|
event -> entrance: push事件
|
|
|
|
== 根据主题处理不同事件 ==
|
|
entrance -> eventSvc: push【latest】或【history】事件
|
|
note over eventSvc: 处理topic包含v1/tskv的事件
|
|
note over eventSvc: 【latest】或【history】事件处理
|
|
alt #LightBlue latest 事件
|
|
eventSvc -> tskvSvc: 【async】saveProtoLatest:将推送来的数据去重、新增最新数据
|
|
|||
|
|
else #Lavender history 事件
|
|
eventSvc -> tskvSvc: saveProtoTsKv:存储所有推送来的数据
|
|
eventSvc -> tskvSvc: 【async】saveProtoLatest:将推送来的数据去重、新增最新数据
|
|
|||
|
|
end
|
|
|||
|
|
eventSvc -> os: 执行物计算(push CalcLogSaveEvent)
|
|
eventSvc -> os: 执行过滤引擎(push FilterLogSaveEvent)
|
|
|||
|
|
eventSvc -> eventSvc: 读application.yml配置中的属性列表:keys
|
|
eventSvc -> eventSvc: 将keys中的每个基础属性添加am后缀,形成新的属性列表amKeys
|
|
|||
|
|
loop dataProtoList
|
|
alt #LightBlue 如果是基础属性,且>0
|
|
eventSvc -> eventSvc: 将dataProto添加到dataProtos
|
|
|||
|
|
else #Lavender 如果是am属性
|
|
eventSvc -> eventSvc: 将dataProto添加到amList
|
|
|||
|
|
else #Gray 其他
|
|
eventSvc -> eventSvc: 丢弃
|
|
end
|
|
end
|
|
|||
|
|
alt #LightBlue dataProtos非空
|
|
eventSvc -> tskvSvc: 【async】amSumProtos(dataProtos);
|
|
|||
|
|
else #Lavender amList非空
|
|
eventSvc -> tskvSvc: hhDdMmYySum(amList);
|
|
|||
|
|
eventSvc -> os: 峰平谷尖计算(push PeakEvent)
|
|
|||
|
|
end
|
|
|||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@enduml
|