public class NullRateLimiter extends Object implements RateLimiter
Modifier and Type | Field and Description |
---|---|
static NullRateLimiter |
INSTANCE |
Modifier and Type | Method and Description |
---|---|
void |
acquire(long permits)
Sleep until the specified number of queries are available.
|
long |
getRate()
Get current QPS of the rate limiter, with a nonpositive rate indicating no limit.
|
public static final NullRateLimiter INSTANCE
public long getRate()
RateLimiter
getRate
in interface RateLimiter
public void acquire(long permits)
RateLimiter
acquire
in interface RateLimiter
Copyright © 2011–2018 The Apache Software Foundation. All rights reserved.