Class NullRateLimiter

  • All Implemented Interfaces:
    RateLimiter

    public class NullRateLimiter
    extends Object
    implements RateLimiter
    A rate limiter which doesn't actually limit rates at all.
    • Method Detail

      • getRate

        public long getRate()
        Description copied from interface: RateLimiter
        Get current QPS of the rate limiter, with a non-positive rate indicating no limit.
        Specified by:
        getRate in interface RateLimiter
      • acquire

        public void acquire​(long permits)
        Description copied from interface: RateLimiter
        Sleep until the specified number of queries are available.
        Specified by:
        acquire in interface RateLimiter