Packages

object Throttler

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Throttler
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. final case class Rate (numberOfCalls: Int, duration: FiniteDuration) extends Product with Serializable

    A rate used for throttling.

    A rate used for throttling.

    Scala API: There are some shorthands available to construct rates:

    import java.util.concurrent.TimeUnit._
    import scala.concurrent.duration.{ Duration, FiniteDuration }
    
    val rate1 = 1 msgsPer (1, SECONDS)
    val rate2 = 1 msgsPer Duration(1, SECONDS)
    val rate3 = 1 msgsPer (1 seconds)
    val rate4 = 1 msgsPerSecond
    val rate5 = 1 msgsPerMinute
    val rate6 = 1 msgsPerHour
    numberOfCalls

    the number of calls that may take place in a period

    duration

    the length of the period

    See also

    akka.contrib.throttle.Throttler

  2. implicit final class RateInt extends AnyVal

    Helper for some syntactic sugar.

    Helper for some syntactic sugar.

    See also

    akka.contrib.throttle.Throttler.Rate

  3. final case class SetRate (rate: Rate) extends Product with Serializable

    Set the rate of a throttler.

    Set the rate of a throttler.

    You may change a throttler's rate at any time.

    rate

    the rate at which messages will be delivered to the target of the throttler

  4. final case class SetTarget (target: Option[ActorRef]) extends Product with Serializable

    Set the target of a throttler.

    Set the target of a throttler.

    You may change a throttler's target at any time.

    Notice that the messages sent by the throttler to the target will have the original sender (and not the throttler) as the sender. (In Akka terms, the throttler forwards the message.)

    target

    if target is None, the throttler will stop delivering messages and the messages already received but not yet delivered, as well as any messages received in the future will be queued and eventually be delivered when a new target is set. If target is not None, the currently queued messages as well as any messages received in the future will be delivered to the new target at a rate not exceeding the current throttler's rate.

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. final def notify(): Unit
    Definition Classes
    AnyRef
  14. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  15. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  16. def toString(): String
    Definition Classes
    AnyRef → Any
  17. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  18. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  19. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped