public class TokenBucketLimiterImpl extends Object implements TokenBucketLimiter
Constructor and Description |
---|
TokenBucketLimiterImpl(int rate,
boolean spin) |
TokenBucketLimiterImpl(int rate,
boolean spin,
TimeUnit unit,
int unitAmount) |
Modifier and Type | Method and Description |
---|---|
int |
getRate()
Returns the rate in cycles per second (which is the same as saying 'in Hertz').
|
boolean |
isSpin() |
void |
limit() |
public TokenBucketLimiterImpl(int rate, boolean spin)
public TokenBucketLimiterImpl(int rate, boolean spin, TimeUnit unit, int unitAmount)
public int getRate()
TokenBucketLimiter
getRate
in interface TokenBucketLimiter
public boolean isSpin()
isSpin
in interface TokenBucketLimiter
public void limit()
limit
in interface TokenBucketLimiter
Copyright © 2019 JBoss by Red Hat. All rights reserved.