Guava contains the very powerful RateLimiter class: you’re not going to need it often, but it’s a truly useful and beautiful piece of code. This class helps you limit the rate of acquisition of a resource with respect to time, so that no more than a certain number of permits can be issued in a second. For instance you can use it to limit the number of operations done in a second, or to limit the rate of some I/O.