Interface SharedRateLimiterFactory.RateProvider
-
- Enclosing class:
- SharedRateLimiterFactory
public static interface SharedRateLimiterFactory.RateProvider
A callback which provides the current rate for aRateLimiter
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description long
getDesiredRate()
Calculate the current rate for theRateLimiter
.
-
-
-
Method Detail
-
getDesiredRate
long getDesiredRate()
Calculate the current rate for theRateLimiter
.- Returns:
- Count of permits which should be provided per second. A non-positive count is taken to indicate that no rate limiting should be performed.
-
-