Interface RateLimiter.Metrics
- All Known Implementing Classes:
AtomicRateLimiter.AtomicRateLimiterMetrics
- Enclosing interface:
- RateLimiter
public static interface RateLimiter.Metrics
-
Method Summary
Modifier and TypeMethodDescriptionintEstimates count of available permissions.intReturns an estimate of the number of threads waiting for permission in this JVM process.
-
Method Details
-
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
-