public interface RequestRateLimiter
| Modifier and Type | Method and Description |
|---|---|
boolean |
geLimitWhenIncremented(java.lang.String key)
Determine if the given key, after incrementing by one, is >= the configured rate limit.
|
boolean |
geLimitWhenIncremented(java.lang.String key,
int weight)
Determine if the given key, after incrementing by the given weight, is >= the configured rate limit.
|
boolean |
overLimitWhenIncremented(java.lang.String key)
Determine if the given key, after incrementing by one, has exceeded the configured rate limit.
|
boolean |
overLimitWhenIncremented(java.lang.String key,
int weight)
Determine if the given key, after incrementing by the given weight, has exceeded the configured rate limit.
|
boolean |
resetLimit(java.lang.String key)
Resets the accumulated rate for the given key.
|
boolean overLimitWhenIncremented(java.lang.String key)
key - key.true if the key is over the limit, otherwise falseboolean overLimitWhenIncremented(java.lang.String key,
int weight)
key - key.weight - A variable weight.true if the key has exceeded the limit, otherwise false .boolean geLimitWhenIncremented(java.lang.String key)
key - key.true if the key is >== the limit, otherwise false .boolean geLimitWhenIncremented(java.lang.String key,
int weight)
key - key.weight - A variable weight.true if the key is >== the limit, otherwise false .boolean resetLimit(java.lang.String key)
key - key.true if the key existed, otherwise false .