Skip to content

gmethvin/guava-bursty-rate-limiter

 
 

Repository files navigation

guava-bursty-rate-limiter

This is a small library to provide an additional public API for the Guava rate limiter. The library provides an API, SmoothBurstyRateLimiter, that lets you create a rate limiter with bursts of a given period (other than the default 1 second). This effectively implements google/guava#1974 as a separate library.

It can be used like this:

import com.google.common.util.concurrent.SmoothBurstyRateLimiter;

/* ... */

// Create a rate limiter with 10 qps with a burst period of 30s (max burst of 300).
RateLimiter rateLimiter = SmoothBurstyRateLimiter.create(10, 30);

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Scala 71.0%
  • Java 29.0%