object Throttler
- Alphabetic
- By Inheritance
- Throttler
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- sealed trait ThrottleMode extends AnyRef
Describe how to deal with exceed rate.
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def throttle[F[_], O](elements: Long, duration: FiniteDuration, mode: ThrottleMode, burst: Long, fnCost: (O) => F[Long])(implicit arg0: Temporal[F]): Pipe[F, O, O]
The pipe that uses the token bucket algorithm to throttle elements of the stream according to the given rate, the burst and elements cost.
The pipe that uses the token bucket algorithm to throttle elements of the stream according to the given rate, the burst and elements cost.
- elements
the allowed number of elements
- duration
the period time in which emitted elements must meet
- mode
the throttle mode ThrottleMode
- burst
increase the capacity threshold
- fnCost
calculate a cost of the element
- returns
fs2.Pipe
- def throttle[F[_], O](elements: Long, duration: FiniteDuration, mode: ThrottleMode, burst: Long)(implicit arg0: Temporal[F]): Pipe[F, O, O]
The pipe that uses the token bucket algorithm to throttle elements of the stream according to the given rate.
The pipe that uses the token bucket algorithm to throttle elements of the stream according to the given rate.
- elements
the allowed number of elements
- duration
the period time in which emitted elements must meet
- mode
the throttle mode ThrottleMode
- burst
increase the capacity threshold
- returns
fs2.Pipe
- def throttle[F[_], O](elements: Long, duration: FiniteDuration, mode: ThrottleMode)(implicit arg0: Temporal[F]): Pipe[F, O, O]
The pipe that uses the token bucket algorithm to throttle elements of the stream according to the given rate.
The pipe that uses the token bucket algorithm to throttle elements of the stream according to the given rate.
- elements
the allowed number of elements
- duration
the period time in which emitted elements must meet
- mode
the throttle mode ThrottleMode
- returns
fs2.Pipe
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- case object Enforcing extends ThrottleMode with Product with Serializable
The mode that skips elements to meet the required rate.
- case object Shaping extends ThrottleMode with Product with Serializable
The mode that make pauses before emitting elements of the stream to meet the required rate.
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)