类 StableRateLimiter
java.lang.Object
com.github.myzhan.locust4j.ratelimit.AbstractRateLimiter
com.github.myzhan.locust4j.ratelimit.StableRateLimiter
- 所有已实现的接口:
Runnable
A
StableRateLimiter distributes permits at a configurable rate.
Each acquire() blocks until a permit is available.- 从以下版本开始:
- 1.0.3
- 作者:
- myzhan
-
构造器概要
构造器构造器说明StableRateLimiter(long maxThreshold) StableRateLimiter(long maxThreshold, long period, TimeUnit unit) -
方法概要
-
构造器详细资料
-
StableRateLimiter
public StableRateLimiter(long maxThreshold) -
StableRateLimiter
-
-
方法详细资料
-
start
public void start()从类复制的说明:AbstractRateLimiterrate limiter only works after started.- 指定者:
start在类中AbstractRateLimiter
-
run
-
acquire
public boolean acquire()从类复制的说明:AbstractRateLimiterAcquire a permit from rate limiter.- 指定者:
acquire在类中AbstractRateLimiter- 返回:
- blocked
-
stop
public void stop()从类复制的说明:AbstractRateLimiterStop the rate limiter.- 指定者:
stop在类中AbstractRateLimiter
-
isStopped
public boolean isStopped()从类复制的说明:AbstractRateLimiterIs rate limiter stopped.- 指定者:
isStopped在类中AbstractRateLimiter- 返回:
- stopped
-