类 TpsMonitorPoint
java.lang.Object
com.alibaba.nacos.core.remote.control.TpsMonitorPoint
tps control point.
- 版本:
- $Id: TpsControlPoint.java, v 0.1 2021年01月09日 12:38 PM liuzunfei Exp $
- 作者:
- liuzunfei
-
字段概要
字段 -
构造器概要
构造器构造器说明TpsMonitorPoint(String pointName)TpsMonitorPoint(String pointName, int maxTps, String monitorType) -
方法概要
修饰符和类型方法说明voidapplyRule(TpsControlRule newControlRule)apply tps control rule to this point.booleanapplyTps(String connectionId, List<MonitorKey> monitorKeys)increase tps.static StringgetTimeFormatOfSecond(long timeStamp)get format string "2021-01-16 17:20:21" of timestamp.static longgetTrimMillsOfHour(long timeStamp)get trim mills of second.static longgetTrimMillsOfMinute(long timeStamp)get trim mills of second.static longgetTrimMillsOfSecond(long timeStamp)get trim mills of second.voidsetPointName(String pointName)
-
字段详细资料
-
DEFAULT_RECORD_SIZE
public static final int DEFAULT_RECORD_SIZE- 另请参阅:
- 常量字段值
-
monitorKeysRecorder
-
-
构造器详细资料
-
TpsMonitorPoint
-
TpsMonitorPoint
-
-
方法详细资料
-
getTrimMillsOfSecond
public static long getTrimMillsOfSecond(long timeStamp)get trim mills of second.- 参数:
timeStamp- timestamp milliseconds.- 返回:
-
getTrimMillsOfMinute
public static long getTrimMillsOfMinute(long timeStamp)get trim mills of second.- 参数:
timeStamp- timestamp milliseconds.- 返回:
-
getTrimMillsOfHour
public static long getTrimMillsOfHour(long timeStamp)get trim mills of second.- 参数:
timeStamp- timestamp milliseconds.- 返回:
-
getTimeFormatOfSecond
get format string "2021-01-16 17:20:21" of timestamp.- 参数:
timeStamp- timestamp milliseconds.- 返回:
-
applyTps
increase tps.- 参数:
monitorKeys- monitorKeys.- 返回:
- check current tps is allowed.
-
getTpsRecorder
-
getPointName
-
setPointName
-
applyRule
apply tps control rule to this point.- 参数:
newControlRule- controlRule.
-