1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
| package com.flightfeather.monitor.analysis
|
| /**
| * 数据分析接口
| */
| abstract class DataAnalysisInterface<T, V>(config: V) {
|
| init {
| initConfig(config)
| }
|
| abstract fun initConfig(config: V)
|
| /**
| * 接收下一个时间点的数据
| */
| abstract fun onNextData(data: T)
|
| /**
| * 将分析结果入库
| */
| abstract fun toDb()
|
| /**
| * 判断相邻数据是否连续
| */
| fun isContinuous(d1:T, d2:T) {
|
| }
| }
|
|