Search in sources :

Example 11 with SystemRule

use of com.alibaba.csp.sentinel.slots.system.SystemRule in project XHuiCloud by sindaZeng.

the class SystemRuleEntity method toRule.

@Override
public SystemRule toRule() {
    SystemRule rule = new SystemRule();
    rule.setHighestSystemLoad(highestSystemLoad);
    rule.setAvgRt(avgRt);
    rule.setMaxThread(maxThread);
    rule.setQps(qps);
    rule.setHighestCpuUsage(highestCpuUsage);
    return rule;
}
Also used : SystemRule(com.alibaba.csp.sentinel.slots.system.SystemRule)

Example 12 with SystemRule

use of com.alibaba.csp.sentinel.slots.system.SystemRule in project RuoYi-Cloud-Plus by JavaLionLi.

the class SystemRuleEntity method toRule.

@Override
public SystemRule toRule() {
    SystemRule rule = new SystemRule();
    rule.setHighestSystemLoad(highestSystemLoad);
    rule.setAvgRt(avgRt);
    rule.setMaxThread(maxThread);
    rule.setQps(qps);
    rule.setHighestCpuUsage(highestCpuUsage);
    return rule;
}
Also used : SystemRule(com.alibaba.csp.sentinel.slots.system.SystemRule)

Example 13 with SystemRule

use of com.alibaba.csp.sentinel.slots.system.SystemRule in project Sermant by huaweicloud.

the class SystemRuleVo method toRule.

@Override
public SystemRule toRule() {
    SystemRule rule = new SystemRule();
    rule.setHighestSystemLoad(highestSystemLoad);
    rule.setAvgRt(avgRt);
    rule.setMaxThread(maxThread);
    rule.setQps(qps);
    rule.setHighestCpuUsage(highestCpuUsage);
    return rule;
}
Also used : SystemRule(com.alibaba.csp.sentinel.slots.system.SystemRule)

Aggregations

SystemRule (com.alibaba.csp.sentinel.slots.system.SystemRule)13 ArrayList (java.util.ArrayList)3 AuthorityRule (com.alibaba.csp.sentinel.slots.block.authority.AuthorityRule)2 DegradeRule (com.alibaba.csp.sentinel.slots.block.degrade.DegradeRule)2 FlowRule (com.alibaba.csp.sentinel.slots.block.flow.FlowRule)2 ParamFlowItem (com.alibaba.csp.sentinel.slots.block.flow.param.ParamFlowItem)2 ParamFlowRule (com.alibaba.csp.sentinel.slots.block.flow.param.ParamFlowRule)2 Test (org.junit.Test)2 Context (com.alibaba.csp.sentinel.context.Context)1 ClusterNode (com.alibaba.csp.sentinel.node.ClusterNode)1 DefaultNode (com.alibaba.csp.sentinel.node.DefaultNode)1 PostConstruct (javax.annotation.PostConstruct)1