public interface RateLimit
Modifier and Type | Method and Description |
---|---|
List<TemporalBucket> |
getBuckets()
Get the rate limit's buckets.
|
static long |
getOrDelay(RateLimit... rateLimits)
Ensures that all provided rateLimits can be obeyed, or returns an estimated delay in milliseconds to wait.
|
void |
onResponse(org.asynchttpclient.Response response)
Callback for when a response returns.
|
long |
retryAfterDelay()
Get delay needed to respect retry-after headers.
|
long retryAfterDelay()
List<TemporalBucket> getBuckets()
void onResponse(org.asynchttpclient.Response response)
response
- Response that applies to this RateLimit.static long getOrDelay(RateLimit... rateLimits)
rateLimits
- Rate limits to obey.Copyright © 2019. All rights reserved.