Allows the user to await
on requests that have a wider width than the
burstSize
specified in AsyncMeter.
Allows the user to await
on requests that have a wider width than the
burstSize
specified in AsyncMeter.
WARNING: this means that you are able to arbitrarily exceed your
burstSize
setting, so it violates the contract that you never exceed
burstSize
within a given burstDuration
. Also, because of the
implementation, it consumes more than one slot from maxWaiters
.
Creates an AsyncMeter that has a maximum burst size of burstSize
over
burstDuration
, and no more than maxWaiters
waiters.
Creates an AsyncMeter that has a maximum burst size of burstSize
over
burstDuration
, and no more than maxWaiters
waiters. The burstSize
permits will be disbursed on a regular schedule, so that they aren't
bunched up.
Creates an AsyncMeter that allows smoothed out permits
permits per
second, and has a maximum burst size of permits
over one second.
Creates an AsyncMeter that allows smoothed out permits
permits per
second, and has a maximum burst size of permits
over one second.
This is equivalent to AsyncMeter.newMeter(permits, 1.second, maxWaiters)
.