public class LocalSimpleCountRateCounter extends RateCounter
| 构造器和说明 |
|---|
LocalSimpleCountRateCounter(String name,
TimeUnit period) |
| 限定符和类型 | 方法和说明 |
|---|---|
long |
add(long timestamp,
long count)
add count for the second of timestamp.
|
com.alibaba.nacos.plugin.control.tps.nacos.LocalSimpleCountRateCounter.TpsSlot |
createSlotIfAbsent(long timeStamp)
get slot of the timestamp second,create if not exist.
|
long |
getCount(long timestamp)
get count of the second of timestamp.
|
void |
minus(long timestamp,
long count) |
getName, getPeriod, getTrimMillsOfHour, getTrimMillsOfMinute, getTrimMillsOfSecondpublic long add(long timestamp,
long count)
RateCounteradd 在类中 RateCountertimestamp - timestamp.count - count.public void minus(long timestamp,
long count)
public long getCount(long timestamp)
RateCountergetCount 在类中 RateCountertimestamp - timestamp.public com.alibaba.nacos.plugin.control.tps.nacos.LocalSimpleCountRateCounter.TpsSlot createSlotIfAbsent(long timeStamp)
timeStamp - the timestamp second.Copyright © 2018–2023 Alibaba Group. All rights reserved.