public class NRateLimitSlidingWindowRule extends Object implements NRateLimitRule
| Constructor and Description |
|---|
NRateLimitSlidingWindowRule(NRateLimitRuleModel model) |
| Modifier and Type | Method and Description |
|---|---|
long |
nextAvailableMillis(int count) |
void |
refill() |
NRateLimitRuleModel |
toModel() |
String |
toString() |
boolean |
tryConsume(int count) |
public NRateLimitSlidingWindowRule(NRateLimitRuleModel model)
public boolean tryConsume(int count)
tryConsume in interface NRateLimitRulepublic long nextAvailableMillis(int count)
nextAvailableMillis in interface NRateLimitRulepublic void refill()
public NRateLimitRuleModel toModel()
toModel in interface NRateLimitRuleCopyright © 2025 vpc open source initiative. All rights reserved.