Refactor constructor parameter for clarity in LeakyBucketLimiter
This commit is contained in:
1 parent
4a7167ed7b
commit
4d5d57a367
1 file changed
+3
-3
@@ -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