kongdeqiang
2022-12-16 daf6a95086087ec99232eea8b4648b7541881f7c
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
109
110
111
112
113
114
115
116
117
118
package com.wgcloud.util.staticvar;
 
import com.wgcloud.entity.*;
 
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
 
 
/**
 * @version v3.3
 * @ClassName:BatchData.java
 * @author: http://www.wgstart.com
 * @date: 2021年1月16日
 * @Description: 临时存贮监控数据的静态工具类
 * @Copyright: 2019-2021 wgcloud. All rights reserved.
 */
public class BatchData {
 
    //系统信息
    public static List<SystemInfo> SYSTEM_INFO_LIST = Collections.synchronizedList(new ArrayList<SystemInfo>());
 
 
    //进程信息
    public static List<AppInfo> APP_INFO_LIST = Collections.synchronizedList(new ArrayList<AppInfo>());
 
 
    //进程状态
    public static List<AppState> APP_STATE_LIST = Collections.synchronizedList(new ArrayList<AppState>());
 
    //日志监控信息
    public static List<FileWarnInfo> FILEWARN_INFO_LIST = Collections.synchronizedList(new ArrayList<FileWarnInfo>());
 
 
    //日志监控状态
    public static List<FileWarnState> FILEWARN_STATE_LIST = Collections.synchronizedList(new ArrayList<FileWarnState>());
 
    //自定义监控项信息
    public static List<CustomInfo> CUSTOM_INFO_LIST = Collections.synchronizedList(new ArrayList<CustomInfo>());
 
    //自定义监控项状态
    public static List<CustomState> CUSTOM_STATE_LIST = Collections.synchronizedList(new ArrayList<CustomState>());
 
 
    //docker信息
    public static List<DockerInfo> DOCKER_INFO_LIST = Collections.synchronizedList(new ArrayList<DockerInfo>());
 
    //端口信息
    public static List<PortInfo> PORT_INFO_LIST = Collections.synchronizedList(new ArrayList<PortInfo>());
 
    //文件防篡改监测信息
    public static List<FileSafe> FILE_SAFE_LIST = Collections.synchronizedList(new ArrayList<FileSafe>());
 
    //docker状态
    public static List<DockerState> DOCKER_STATE_LIST = Collections.synchronizedList(new ArrayList<DockerState>());
 
    //cpu监控
    public static List<CpuState> CPU_STATE_LIST = Collections.synchronizedList(new ArrayList<CpuState>());
 
    //内存监控
    public static List<MemState> MEM_STATE_LIST = Collections.synchronizedList(new ArrayList<MemState>());
 
    //网络吞吐监控,暂没用
    public static List<NetIoState> NETIO_STATE_LIST = Collections.synchronizedList(new ArrayList<NetIoState>());
 
    //磁盘大小
    public static List<DiskState> DISK_STATE_LIST = Collections.synchronizedList(new ArrayList<DiskState>());
 
 
    //磁盘IO
    public static List<DeskIo> DESK_IO_LIST = Collections.synchronizedList(new ArrayList<DeskIo>());
 
    //磁盘smart
    public static List<DiskSmart> DISK_SMART_LIST = Collections.synchronizedList(new ArrayList<DiskSmart>());
 
 
    //cpu温度
    public static List<CpuTemperatures> CPU_TEMPERATURES_LIST = Collections.synchronizedList(new ArrayList<CpuTemperatures>());
 
 
    //系统负载监控
    public static List<SysLoadState> SYSLOAD_STATE_LIST = Collections.synchronizedList(new ArrayList<SysLoadState>());
 
    //tcp监控,暂没用
    public static List<TcpState> TCP_STATE_LIST = Collections.synchronizedList(new ArrayList<TcpState>());
 
    //日志信息
    public static List<LogInfo> LOG_INFO_LIST = Collections.synchronizedList(new ArrayList<LogInfo>());
 
 
    //接口检测状态信息
    public static List<HeathState> HEATH_STATE_LIST = Collections.synchronizedList(new ArrayList<HeathState>());
 
    //数通设备PING检测状态信息
    public static List<DceState> DCE_STATE_LIST = Collections.synchronizedList(new ArrayList<DceState>());
 
    //SNMP设备检测状态信息
    public static List<SnmpState> SNMP_STATE_LIST = Collections.synchronizedList(new ArrayList<SnmpState>());
 
    //数据表DbTableCount检测状态信息
    public static List<DbTableCount> DBTABLE_COUNT_LIST = Collections.synchronizedList(new ArrayList<DbTableCount>());
 
    /**
     * 定时清空历史趋势图数据时,丢弃期间的agent监控数据更新,但依然保留趋势图状态数据,防止死锁
     */
    public static void clearAll() {
        BatchData.SYSTEM_INFO_LIST.clear();
        BatchData.APP_INFO_LIST.clear();
        BatchData.FILEWARN_INFO_LIST.clear();
        BatchData.FILEWARN_STATE_LIST.clear();
        BatchData.DOCKER_INFO_LIST.clear();
        BatchData.PORT_INFO_LIST.clear();
        //以下cpu温度没有趋势图,因此也没有必要暂存清理历史数据时候的上报数据
        BatchData.CPU_TEMPERATURES_LIST.clear();
    }
 
 
}