类 TpsMonitorPoint

java.lang.Object
com.alibaba.nacos.core.remote.control.TpsMonitorPoint

public class TpsMonitorPoint extends Object
tps control point.
版本:
$Id: TpsControlPoint.java, v 0.1 2021年01月09日 12:38 PM liuzunfei Exp $
作者:
liuzunfei
  • 字段详细资料

  • 构造器详细资料

    • TpsMonitorPoint

      public TpsMonitorPoint(String pointName)
    • TpsMonitorPoint

      public TpsMonitorPoint(String pointName, int maxTps, String monitorType)
  • 方法详细资料

    • 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

      public static String getTimeFormatOfSecond(long timeStamp)
      get format string "2021-01-16 17:20:21" of timestamp.
      参数:
      timeStamp - timestamp milliseconds.
      返回:
    • applyTps

      public boolean applyTps(String connectionId, List<MonitorKey> monitorKeys)
      increase tps.
      参数:
      monitorKeys - monitorKeys.
      返回:
      check current tps is allowed.
    • getTpsRecorder

      public TpsRecorder getTpsRecorder()
    • getPointName

      public String getPointName()
    • setPointName

      public void setPointName(String pointName)
    • applyRule

      public void applyRule(TpsControlRule newControlRule)
      apply tps control rule to this point.
      参数:
      newControlRule - controlRule.