doc: Improve javadoc for DegradeRule and dashboard ApiPredicateItemVo (#2614)

This commit is contained in:
David Huang 2022-03-23 21:15:36 +08:00 committed by GitHub
parent ab6c9adcec
commit 2cb9747e56
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 1 deletions

View File

@ -59,7 +59,12 @@ public class DegradeRule extends AbstractRule {
private int grade = RuleConstant.DEGRADE_GRADE_RT; private int grade = RuleConstant.DEGRADE_GRADE_RT;
/** /**
* Threshold count. * Threshold count. The exact meaning depends on the field of grade.
* <ul>
* <li>In average RT mode, it means the maximum response time(RT) in milliseconds.</li>
* <li>In exception ratio mode, it means exception ratio which between 0.0 and 1.0.</li>
* <li>In exception count mode, it means exception count</li>
* <ul/>
*/ */
private double count; private double count;
@ -78,9 +83,16 @@ public class DegradeRule extends AbstractRule {
/** /**
* The threshold of slow request ratio in RT mode. * The threshold of slow request ratio in RT mode.
*
* @since 1.8.0
*/ */
private double slowRatioThreshold = 1.0d; private double slowRatioThreshold = 1.0d;
/**
* The interval statistics duration in millisecond.
*
* @since 1.8.0
*/
private int statIntervalMs = 1000; private int statIntervalMs = 1000;
public int getGrade() { public int getGrade() {

View File

@ -23,8 +23,20 @@ package com.alibaba.csp.sentinel.dashboard.domain.vo.gateway.api;
*/ */
public class ApiPredicateItemVo { public class ApiPredicateItemVo {
/**
* The pattern for matching url.
*/
private String pattern; private String pattern;
/**
* The matching Strategy in url. Constants are defined in class SentinelGatewayConstants.\
*
* <ul>
* <li>0(URL_MATCH_STRATEGY_EXACT): exact match mode</li>
* <li>1(URL_MATCH_STRATEGY_PREFIX): prefix match mode</li>
* <li>2(URL_MATCH_STRATEGY_REGEX): regex match mode</li>
* </ul>
*/
private Integer matchStrategy; private Integer matchStrategy;
public String getPattern() { public String getPattern() {