Interface RateLimiter.Metrics
-
- All Known Implementing Classes:
AtomicRateLimiter.AtomicRateLimiterMetrics
- Enclosing interface:
- RateLimiter
public static interface RateLimiter.Metrics
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetAvailablePermissions()Estimates count of available permissions.intgetNumberOfWaitingThreads()Returns an estimate of the number of threads waiting for permission in this JVM process.
-
-
-
Method Detail
-
getNumberOfWaitingThreads
int getNumberOfWaitingThreads()
Returns an estimate of the number of threads waiting for permission in this JVM process.This method is typically used for debugging and testing purposes.
- Returns:
- estimate of the number of threads waiting for permission.
-
getAvailablePermissions
int getAvailablePermissions()
Estimates count of available permissions. Can be negative if some permissions where reserved.This method is typically used for debugging and testing purposes.
- Returns:
- estimated count of permissions
-
-