Refactor constructor parameter for clarity in LeakyBucketLimiter
This commit is contained in:
@@ -75,10 +75,10 @@ public final class LeakyBucketLimiter implements RateLimiter {
|
||||
/**
|
||||
* Creates an empty bucket.
|
||||
*
|
||||
* @param state the creation timestamp in nanoseconds
|
||||
* @param nowNanos the creation timestamp in nanoseconds
|
||||
*/
|
||||
private LeakyBucket(long state) {
|
||||
this.state = new AtomicReference<>(new State(0, state));
|
||||
private LeakyBucket(long nowNanos) {
|
||||
this(new AtomicReference<>(new State(0, nowNanos)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user