public class RateLimit extends Object
we specify rate limits in terms of both a human readable wild-card URI and a machine processable regular expression. The regular expression boundary matcher '^' takes affect after the root URI path. For example, the regular expression ^/servers would match the bolded portion of the following URI: https://servers.api.rackspacecloud.com/v1.0/3542812 /servers .
Rate limits are applied in order relative to the verb, going from least to most specific. For example, although the threshold for POST to /servers is 25 per day, one cannot POST to /servers more than 10 times within a single minute because the rate limits for any POST is 10/min. In the event you exceed the thresholds established for your identity, a 413 Rate Control HTTP response will be returned with a Reply-After header to notify the client when theyagain.
Modifier and Type | Class and Description |
---|---|
static class |
RateLimit.Builder<T extends RateLimit.Builder<T>> |
Modifier | Constructor and Description |
---|---|
protected |
RateLimit(String uri,
String regex,
int remaining,
long resetTime,
RateLimitUnit unit,
int value,
String verb) |
Modifier and Type | Method and Description |
---|---|
static RateLimit.Builder<?> |
builder() |
boolean |
equals(Object obj) |
String |
getRegex() |
int |
getRemaining() |
long |
getResetTime() |
RateLimitUnit |
getUnit() |
String |
getUri() |
int |
getValue() |
String |
getVerb() |
int |
hashCode() |
protected com.google.common.base.Objects.ToStringHelper |
string() |
RateLimit.Builder<?> |
toBuilder() |
String |
toString() |
@ConstructorProperties(value={"uri","regex","remaining","resetTime","unit","value","verb"}) protected RateLimit(String uri, @Nullable String regex, int remaining, long resetTime, @Nullable RateLimitUnit unit, int value, @Nullable String verb)
public static RateLimit.Builder<?> builder()
public RateLimit.Builder<?> toBuilder()
public String getUri()
public int getRemaining()
public long getResetTime()
@Nullable public RateLimitUnit getUnit()
public int getValue()
protected com.google.common.base.Objects.ToStringHelper string()
Copyright © 2009-2013 jclouds. All Rights Reserved.