public class NoOpRateLimiter extends Object implements RateLimiter
RateLimiter that allows requests to be sent to Brightpearl as fast as they are made by
the client. Suitable for use anywhere the request cap is unlikely to be reached, when another strategy is in place
for limiting the rate of requests, or when the client is set up to recover from rate limit errors automatically.| Constructor and Description |
|---|
NoOpRateLimiter() |
| Modifier and Type | Method and Description |
|---|---|
void |
rateLimit(Account account)
This implementation does nothing.
|
void |
requestCapExceeded(Account account)
This implementation does nothing.
|
void |
requestCompleted(Account account,
int requestsRemaining,
long nextThrottlePeriod)
This implementation does nothing.
|
public void rateLimit(Account account)
rateLimit in interface RateLimiteraccount - The account a request will be sent to.public void requestCompleted(Account account, int requestsRemaining, long nextThrottlePeriod)
requestCompleted in interface RateLimiteraccount - The account a response has been received from.requestsRemaining - The value of the brightpearl-requests-remaining response header.nextThrottlePeriod - The value of the brightpearl-next-throttle-period header.public void requestCapExceeded(Account account)
requestCapExceeded in interface RateLimiteraccount - An account for which a request cap error has been received.Copyright © 2014. All Rights Reserved.