upperbound
package upperbound
- Alphabetic
- By Inheritance
- upperbound
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
class
BackPressure[F[_], A] extends AnyRef
Adds the ability to apply backpressure to the Limiter.
Adds the ability to apply backpressure to the Limiter.
The
ack
parameter can be used to signal to the Limiter that backpressure should be applied depending on the result ofjob
. Note that this will only change the processing rate: it won't do any error handling for you.Every time a job signals backpressure is needed, the Limiter will adjust its current rate by applying
backOff
to it. This means the rate will be adjusted by callingbackOff
repeatedly whenever multiple consecutive jobs signal for backpressure, and reset to its original value when a job signals backpressure is no longer needed.Note that since jobs submitted to the Limiter are processed asynchronously, rate changes might not propagate instantly when the rate is smaller than the job completion time. However, the rate will eventually converge to its most up-to-date value.
Also see syntax.backpressure
- type LimitReachedException = upperbound.Limiter.LimitReachedException
-
trait
Limiter[F[_]] extends AnyRef
A purely functional, interval based rate limiter.
-
case class
Rate(n: Int, t: FiniteDuration) extends Product with Serializable
Models the job processing rate Also see syntax.rate