干燥机配套车间生产管理系统/云平台服务端
zhuguifei
2024-11-29 339515558253d776769dc2e2560bbb4a0450c989
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
package com.alibaba.csp.sentinel.dashboard.rule.nacos.entity;
 
import com.alibaba.csp.sentinel.dashboard.datasource.entity.rule.RuleEntity;
import com.alibaba.csp.sentinel.slots.block.Rule;
import com.alibaba.csp.sentinel.slots.block.flow.param.ParamFlowClusterConfig;
import com.alibaba.csp.sentinel.slots.block.flow.param.ParamFlowItem;
import com.alibaba.csp.sentinel.slots.block.flow.param.ParamFlowRule;
 
import java.util.*;
 
/**
 * @author zyf
 * @description 重写热点规则实体类,。查看sentinel-dashboard在自定义ParamFlowRuleNacosPublisher时候 推送的数据是ParamFlowRuleEntity。 客户端接收的ParamFlowRule类
 * @date 2022-04-13
 */
public class ParamFlowRuleCorrectEntity implements RuleEntity {
 
    private Long id;
    private String app;
    private String ip;
    private Integer port;
    private String limitApp;
    private String resource;
    private Date gmtCreate;
 
    private int grade = 1;
    private Integer paramIdx;
    private double count;
    private int controlBehavior = 0;
    private int maxQueueingTimeMs = 0;
    private int burstCount = 0;
    private long durationInSec = 1L;
    private List<ParamFlowItem> paramFlowItemList = new ArrayList();
    private Map<Object, Integer> hotItems = new HashMap();
    private boolean clusterMode = false;
    private ParamFlowClusterConfig clusterConfig;
 
    public int getGrade() {
        return grade;
    }
 
    public void setGrade(int grade) {
        this.grade = grade;
    }
 
    public Integer getParamIdx() {
        return paramIdx;
    }
 
    public void setParamIdx(Integer paramIdx) {
        this.paramIdx = paramIdx;
    }
 
    public double getCount() {
        return count;
    }
 
    public void setCount(double count) {
        this.count = count;
    }
 
    public int getControlBehavior() {
        return controlBehavior;
    }
 
    public void setControlBehavior(int controlBehavior) {
        this.controlBehavior = controlBehavior;
    }
 
    public int getMaxQueueingTimeMs() {
        return maxQueueingTimeMs;
    }
 
    public void setMaxQueueingTimeMs(int maxQueueingTimeMs) {
        this.maxQueueingTimeMs = maxQueueingTimeMs;
    }
 
    public int getBurstCount() {
        return burstCount;
    }
 
    public void setBurstCount(int burstCount) {
        this.burstCount = burstCount;
    }
 
    public long getDurationInSec() {
        return durationInSec;
    }
 
    public void setDurationInSec(long durationInSec) {
        this.durationInSec = durationInSec;
    }
 
    public List<ParamFlowItem> getParamFlowItemList() {
        return paramFlowItemList;
    }
 
    public void setParamFlowItemList(List<ParamFlowItem> paramFlowItemList) {
        this.paramFlowItemList = paramFlowItemList;
    }
 
    public Map<Object, Integer> getHotItems() {
        return hotItems;
    }
 
    public void setHotItems(Map<Object, Integer> hotItems) {
        this.hotItems = hotItems;
    }
 
    public boolean isClusterMode() {
        return clusterMode;
    }
 
    public void setClusterMode(boolean clusterMode) {
        this.clusterMode = clusterMode;
    }
 
    public ParamFlowClusterConfig getClusterConfig() {
        return clusterConfig;
    }
 
    public void setClusterConfig(ParamFlowClusterConfig clusterConfig) {
        this.clusterConfig = clusterConfig;
    }
 
    @Override
    public Date getGmtCreate() {
        return gmtCreate;
    }
 
    public void setGmtCreate(Date gmtCreate) {
        this.gmtCreate = gmtCreate;
    }
 
    @Override
    public Long getId() {
        return id;
    }
 
    @Override
    public void setId(Long id) {
        this.id = id;
    }
 
    @Override
    public String getApp() {
        return app;
    }
 
    public void setApp(String app) {
        this.app = app;
    }
 
    @Override
    public String getIp() {
        return ip;
    }
 
    public void setIp(String ip) {
        this.ip = ip;
    }
 
    @Override
    public Integer getPort() {
        return port;
    }
 
    public void setPort(Integer port) {
        this.port = port;
    }
 
    public String getLimitApp() {
        return limitApp;
    }
 
    public void setLimitApp(String limitApp) {
        this.limitApp = limitApp;
    }
 
    public String getResource() {
        return resource;
    }
 
    public void setResource(String resource) {
        this.resource = resource;
    }
 
    @Override
    public Rule toRule() {
        ParamFlowRule rule = new ParamFlowRule();
        return rule;
    }
}