ustcyc
2025-01-07 de5d55508afd27fb2b47e6d4d6fd9984525c222c
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
package com.zhitan.realtimedata.service;
 
 
import com.zhitan.common.enums.CollectionModes;
import com.zhitan.realtimedata.domain.TagValue;
 
import java.util.Date;
import java.util.List;
 
/**
 * @author 范新富 实时数据库访问接口.
 */
public interface RealtimeDatabaseService {
 
    /**
     * 获取单个测点的实时数据.
     *
     * @param tagCode 测点编号
     * @return 测试实时数据
     */
    TagValue retrieve(String tagCode);
 
    /**
     * 获取批量测点的实时数据.
     *
     * @param tagCodes 测点编码集合
     * @return 实时数据集合
     */
    List<TagValue> retrieve(List<String> tagCodes);
 
    /**
     * 获取测点的历史时刻值.
     *
     * @param tagCode  测点编号
     * @param dataTime 历史时刻
     * @return 测点历史时刻值
     */
    TagValue retrieve(String tagCode, Date dataTime);
 
    /**
     * 获取批量测点的历史时刻值.
     *
     * @param tagCodes 测点编号集合
     * @param dataTime 历史时刻
     * @return 测试历史时刻数据集合
     */
    List<TagValue> retrieve(List<String> tagCodes, Date dataTime);
 
    /**
     * 获取一段时间内测点的历史数据.
     *
     * @param tagCode    测点编号
     * @param beginTime  开始时间
     * @param endTime    结束时间
     * @param pointCount 测点得到的数据个数
     * @return 测点历史数据
     */
    List<TagValue> retrieve(String tagCode, Date beginTime, Date endTime, int pointCount);
 
    /**
     * 获取一段时间内批量测点的历史数据.
     *
     * @param tagCodes   测点编号集合
     * @param beginTime  开始时间
     * @param endTime    结束时间
     * @param pointCount 每个测点得到的数据个数
     * @return 测点历史数据
     */
    List<TagValue> retrieve(List<String> tagCodes, Date beginTime, Date endTime, int pointCount);
 
    /**
     * 获取测点在一段时间内的统计数据.
     *
     * @param tagCode         测点编号
     * @param beginTime       开始时间
     * @param endTime         结束时间
     * @param collectionModes 统计类型
     * @return 测点统计结果
     */
    TagValue statistics(String tagCode, Date beginTime, Date endTime,
                        CollectionModes collectionModes);
 
    /**
     * 获取测点在一段时间内的统计数据.
     *
     * @param tagCodes        测点编号集合
     * @param beginTime       开始时间
     * @param endTime         结束时间
     * @param collectionModes 统计类型
     * @return 测点统计结果
     */
    List<TagValue> statistics(List<String> tagCodes, Date beginTime, Date endTime,
                              CollectionModes collectionModes);
 
    /**
     * 存储测点的实时数据.
     *
     * @param tagValues 测点实时数据
     */
    void storeData(List<TagValue> tagValues);
 
    /**
     * 插入测点历史时刻数据.
     *
     * @param tagValues 测点历史时刻数据
     */
    void insertData(List<TagValue> tagValues);
}