public abstract class AbstractRateLimiter extends Object implements RateLimiter
RateLimiter.| Constructor and Description |
|---|
AbstractRateLimiter() |
| Modifier and Type | Method and Description |
|---|---|
Rate |
consume(RateLimitProperties.Policy policy,
String key,
Long requestTime) |
protected abstract Rate |
getRate(String key) |
protected abstract void |
saveRate(Rate rate) |
protected abstract void saveRate(Rate rate)
public Rate consume(RateLimitProperties.Policy policy, String key, Long requestTime)
consume in interface RateLimiterpolicy - Template for which rates should be created in case there's no rate limit associated with the
keykey - Unique key that identifies a requestrequestTime - The total time it took to handle the requestCopyright © 2018 Pivotal Software, Inc.. All rights reserved.