I'd like RateLimiter to come out of Beta. It has been around since version 13.0
We'll take a look. There are a number of things about it that we've hoped to eventually change, but it's hard to see when we would ever get around to them, so perhaps we should just finalize it.
There is a TODO over at com.google.common.util.concurrent.RateLimiter.create
/*
* TODO(cpovirk): make SleepingStopwatch the last parameter throughout the class so that the
* overloads follow the usual convention: Foo(int), Foo(int, SleepingStopwatch)
*/
@VisibleForTesting
static RateLimiter create(SleepingStopwatch stopwatch, double permitsPerSecond) {
RateLimiter rateLimiter = new SmoothBursty(stopwatch, 1.0 /* maxBurstSeconds */);
rateLimiter.setRate(permitsPerSecond);
return rateLimiter;
}
Would you want a pull request to refactor this?
Sure, thanks.
I would also like this API to come out of Beta. Seeing that there hasn't been much activity in this API since this issue was filed, what is the path to getting the annotation removed?
I'd also be glad to see that out of Beta. Are there any still blocking TODOs? What are the plans?
Any updates?
There seems to be one TODO left:
* @author Dimitris Andreou
* @since 13.0
*/
// TODO(user): switch to nano precision. A natural unit of cost is "bytes", and a micro precision
// would mean a maximum rate of "1MB/s", which might be small in some cases.
Most helpful comment
I'd also be glad to see that out of Beta. Are there any still blocking TODOs? What are the plans?