Package | Description |
---|---|
com.google.common.util.concurrent |
Concurrency utilities.
|
Modifier and Type | Class and Description |
---|---|
(package private) class |
SmoothRateLimiter |
(package private) static class |
SmoothRateLimiter.SmoothBursty
This implements a "bursty" RateLimiter, where storedPermits are translated to zero throttling.
|
(package private) static class |
SmoothRateLimiter.SmoothWarmingUp
This implements the following function where coldInterval = coldFactor * stableInterval.
|
Modifier and Type | Method and Description |
---|---|
static RateLimiter |
RateLimiter.create(double permitsPerSecond)
Creates a
RateLimiter with the specified stable throughput, given as
"permits per second" (commonly referred to as QPS, queries per second). |
static RateLimiter |
RateLimiter.create(double permitsPerSecond,
long warmupPeriod,
java.util.concurrent.TimeUnit unit)
Creates a
RateLimiter with the specified stable throughput, given as
"permits per second" (commonly referred to as QPS, queries per second), and a warmup
period, during which the RateLimiter smoothly ramps up its rate, until it reaches
its maximum rate at the end of the period (as long as there are enough requests to saturate
it). |
(package private) static RateLimiter |
RateLimiter.create(RateLimiter.SleepingStopwatch stopwatch,
double permitsPerSecond) |
(package private) static RateLimiter |
RateLimiter.create(RateLimiter.SleepingStopwatch stopwatch,
double permitsPerSecond,
long warmupPeriod,
java.util.concurrent.TimeUnit unit,
double coldFactor) |