public interface CurrentLimiter
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
checkpoint(String key)
校验并追踪
|
boolean |
checkpoint(String key,
long requestThreshold)
校验并追踪
|
long |
countByRange(String key,
Date from,
Date to)
按区间统计
|
long |
getRequestThreshold(String key)
获取配置的访问量
|
void |
setRequestThreshold(String key,
long threshold)
设置一分钟(60s)的访问限制量
|
boolean checkpoint(String key)
key - boolean checkpoint(String key, long requestThreshold)
key - requestThreshold - void setRequestThreshold(String key, long threshold)
key - threshold - long getRequestThreshold(String key)
key - Copyright © 2023. All rights reserved.