public class RateLimit
extends java.lang.Object
| Constructor and Description |
|---|
RateLimit(int intervalMinutes) |
| Modifier and Type | Method and Description |
|---|---|
int |
getAllowedCalls()
Gets the maximum allowed number of calls in this time interval.
|
int |
getCallsMade()
Gets the number of API calls already made in this time interval.
|
int |
getCallsRemaining()
Gets the number of calls still allowed to be made in this time interval.
|
int |
getIntervalMinutes()
Gets the number of minutes in this time interval.
|
long |
getResetTimeSeconds()
Gets the time in seconds when the number of allowed calls in this time interval will be reset.
|
void |
setCallsMade(int callsMade)
Sets the number of API calls already made in this time interval.
|
void |
setCallsRemaining(int callsRemaining)
Sets the remaining allowed number of calls in this time interval.
|
void |
setResetTimeSeconds(long resetTimeSeconds)
Sets the time at which the number of allowed calls in this interval will be reset.
|
public int getAllowedCalls()
public int getIntervalMinutes()
public int getCallsMade()
public void setCallsMade(int callsMade)
callsMade - Number of callspublic int getCallsRemaining()
public void setCallsRemaining(int callsRemaining)
callsRemaining - The remaining number of calls allowedpublic long getResetTimeSeconds()
public void setResetTimeSeconds(long resetTimeSeconds)
resetTimeSeconds - The reset time in seconds