| Modifier and Type | Class and Description |
|---|---|
static class |
TokenRateLimit.RateLimitType
Type of rate limit to know what headers to check.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
HEADER_RETRY_AFTER
Header specifying retry after time in seconds after a 429.
|
static String |
HEADER_X_RATE_LIMIT_TYPE
Header specifying which RateLimitType caused a 429.
|
| Constructor and Description |
|---|
TokenRateLimit(TokenRateLimit.RateLimitType type,
RiotApiConfig config) |
| Modifier and Type | Method and Description |
|---|---|
List<TemporalBucket> |
getBuckets()
Get the rate limit's buckets.
|
void |
onResponse(org.asynchttpclient.Response response)
Callback for when a response returns.
|
long |
retryAfterDelay()
Get delay needed to respect retry-after headers.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetOrDelaypublic static final String HEADER_X_RATE_LIMIT_TYPE
public static final String HEADER_RETRY_AFTER
public TokenRateLimit(TokenRateLimit.RateLimitType type, RiotApiConfig config)
public long retryAfterDelay()
RateLimitretryAfterDelay in interface RateLimitpublic List<TemporalBucket> getBuckets()
RateLimitgetBuckets in interface RateLimitpublic void onResponse(org.asynchttpclient.Response response)
RateLimitonResponse in interface RateLimitresponse - Response that applies to this RateLimit.Copyright © 2019. All rights reserved.