public class RateLimiterBucket extends Object implements Serializable
IRateLimiterComponent implementations.| Constructor and Description |
|---|
RateLimiterBucket()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
long |
getCount() |
long |
getLast() |
long |
getResetMillis(RateBucketPeriod period)
Returns the number of millis until the period resets.
|
void |
resetIfNecessary(RateBucketPeriod period)
Resets the count if the period boundary has been crossed.
|
void |
setCount(long count) |
void |
setLast(long last) |
public void resetIfNecessary(RateBucketPeriod period)
period - the periodpublic long getResetMillis(RateBucketPeriod period)
period - the periodpublic long getCount()
public void setCount(long count)
count - the count to setpublic long getLast()
public void setLast(long last)
last - the last to setCopyright © 2015 JBoss, a division of Red Hat. All rights reserved.