ParallelRequestRateLimiter
A RequestRateLimiter that tries to handle requests in a parallel order. Requests are run sequentially per bucket, allowing requests that do not share a common rate limit to run uninterrupted. Requests that share a common bucket are handled in call order and will suspend to adhere to global and bucket rate limits.
Using this RequestRateLimiter increases the chance of a exceeding the global rate limit, which in exceedingly unlikely cases might result in your bot's account getting temporarily banned. As such, the ExclusionRequestRateLimiter is generally preferred.
Parameters
a Clock used for calculating suspension times, present for testing purposes.
Functions
Awaits all active rate limits for the request, returning a RequestToken used to process the result of the request.
Awaits the rate limits for the request and then runs consumer. Throws an IllegalStateException if the supplied RequestToken was not completed.