类 TpsRecorder
- java.lang.Object
-
- com.alibaba.nacos.core.remote.control.TpsRecorder
-
public class TpsRecorder extends java.lang.Objecttps record.- 版本:
- $Id: TpsRecorder.java, v 0.1 2021年01月09日 12:38 PM liuzunfei Exp $
- 作者:
- liuzunfei
-
-
嵌套类概要
嵌套类 修饰符和类型 类 说明 (专用程序包) static classTpsRecorder.MultiKeyTpsSlot(专用程序包) static classTpsRecorder.SlotCountHolder(专用程序包) static classTpsRecorder.TpsSlot
-
字段概要
字段 修饰符和类型 字段 说明 private longmaxCountprivate java.lang.Stringmodelprivate java.lang.StringmonitorTypemonitor/intercept.(专用程序包) java.util.concurrent.TimeUnitperiodprivate java.util.List<TpsRecorder.TpsSlot>slotListprivate intslotSizeprivate longstartTime
-
构造器概要
构造器 构造器 说明 TpsRecorder(long startTime, java.util.concurrent.TimeUnit period, java.lang.String model, int recordSize)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidclearLimitRule()clearLimitRule.TpsRecorder.TpsSlotcreateSlotIfAbsent(long timeStamp)get slot of the timestamp second,create if not exist.longgetMaxCount()java.lang.StringgetModel()java.lang.StringgetMonitorType()TpsRecorder.TpsSlotgetPoint(long timeStamp)get slot of the timestamp second,read only ,return nul if not exist.java.util.List<TpsRecorder.TpsSlot>getSlotList()booleanisInterceptMode()booleanisProtoModel()voidsetMaxCount(long maxCount)voidsetModel(java.lang.String model)voidsetMonitorType(java.lang.String monitorType)
-
-
-
字段详细资料
-
startTime
private long startTime
-
period
java.util.concurrent.TimeUnit period
-
slotSize
private int slotSize
-
slotList
private java.util.List<TpsRecorder.TpsSlot> slotList
-
maxCount
private long maxCount
-
model
private java.lang.String model
-
monitorType
private java.lang.String monitorType
monitor/intercept.
-
-
方法详细资料
-
isProtoModel
public boolean isProtoModel()
-
getModel
public java.lang.String getModel()
-
setModel
public void setModel(java.lang.String model)
-
createSlotIfAbsent
public TpsRecorder.TpsSlot createSlotIfAbsent(long timeStamp)
get slot of the timestamp second,create if not exist.- 参数:
timeStamp- the timestamp second.- 返回:
- tps slot.
-
getPoint
public TpsRecorder.TpsSlot getPoint(long timeStamp)
get slot of the timestamp second,read only ,return nul if not exist.- 参数:
timeStamp- the timestamp second.- 返回:
- tps slot.
-
getMaxCount
public long getMaxCount()
-
setMaxCount
public void setMaxCount(long maxCount)
-
isInterceptMode
public boolean isInterceptMode()
-
clearLimitRule
public void clearLimitRule()
clearLimitRule.
-
getMonitorType
public java.lang.String getMonitorType()
-
setMonitorType
public void setMonitorType(java.lang.String monitorType)
-
getSlotList
public java.util.List<TpsRecorder.TpsSlot> getSlotList()
-
-