Class SharedRateLimiterFactory


  • public class SharedRateLimiterFactory
    extends Object
    Provides the ability to retrieve a RateLimiter keyed to a specific string, which will dynamically update its rate according to a specified callback function.
    • Method Detail

      • create

        public RateLimiter create​(String name,
                                  SharedRateLimiterFactory.RateProvider rateProvider)
        Lookup the RateLimiter associated with the specified name, or create a new one for that name.
        Parameters:
        name - key for the rate limiter
        rateProvider - a function which can be called to get what the current rate for the rate limiter should be.