Interface TokenBucketLimiter
-
- All Known Implementing Classes:
TokenBucketLimiterImpl
public interface TokenBucketLimiterThis class can throttle to a specific rate, using an algorithm based on the Token Bucket metaphor.The rate is specified in cycles per second (or 'Hertz').
- See Also:
- Token bucket
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetRate()Returns the rate in cycles per second (which is the same as saying 'in Hertz').booleanisSpin()voidlimit()
-
-
-
Method Detail
-
getRate
int getRate()
Returns the rate in cycles per second (which is the same as saying 'in Hertz').- See Also:
- Hertz
-
isSpin
boolean isSpin()
-
limit
void limit()
-
-