akka.routing

DefaultResizer

case class DefaultResizer (lowerBound: Int, upperBound: Int, pressureThreshold: Int, rampupRate: Double, backoffThreshold: Double, backoffRate: Double, stopDelay: Duration, messagesPerResize: Int) extends Resizer with Product with Serializable

Linear Supertypes
Serializable, Serializable, Product, Equals, Resizer, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. DefaultResizer
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. Resizer
  7. AnyRef
  8. Any
Visibility
  1. Public
  2. All

Instance Constructors

  1. new DefaultResizer (lower: Int, upper: Int)

    Java API constructor for default values except bounds.

  2. new DefaultResizer (lowerBound: Int, upperBound: Int, pressureThreshold: Int, rampupRate: Double, backoffThreshold: Double, backoffRate: Double, stopDelay: Duration, messagesPerResize: Int)

Value Members

  1. def != (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  2. def != (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  3. def ## (): Int

    Attributes
    final
    Definition Classes
    AnyRef → Any
  4. def == (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  5. def == (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  6. def asInstanceOf [T0] : T0

    Attributes
    final
    Definition Classes
    Any
  7. def backoff (pressure: Int, capacity: Int): Int

    Computes a proposed negative (or zero) capacity delta using the configured backoffThreshold and backoffRate

    Computes a proposed negative (or zero) capacity delta using the configured backoffThreshold and backoffRate

    pressure

    the current number of busy routees

    capacity

    the current number of total routees

    returns

    proposed decrease in capacity (as a negative number)

  8. val backoffRate : Double

  9. val backoffThreshold : Double

  10. def canEqual (arg0: Any): Boolean

    Definition Classes
    DefaultResizer → Equals
  11. def capacity (routees: IndexedSeq[ActorRef]): Int

    Returns the overall desired change in resizer capacity.

    Returns the overall desired change in resizer capacity. Positive value will add routees to the resizer. Negative value will remove routees from the resizer.

    routees

    The current actor in the resizer

    returns

    the number of routees by which the resizer should be adjusted (positive, negative or zero)

  12. def clone (): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  13. def delayedStop (scheduler: Scheduler, abandon: IndexedSeq[ActorRef]): Unit

    Give concurrent messages a chance to be placed in mailbox before sending PoisonPill.

    Give concurrent messages a chance to be placed in mailbox before sending PoisonPill.

    Attributes
    protected
  14. def eq (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  15. def equals (arg0: Any): Boolean

    Definition Classes
    DefaultResizer → Equals → AnyRef → Any
  16. def filter (pressure: Int, capacity: Int): Int

    This method can be used to smooth the capacity delta by considering the current pressure and current capacity.

    This method can be used to smooth the capacity delta by considering the current pressure and current capacity.

    pressure

    current number of busy routees

    capacity

    current number of routees

    returns

    proposed change in the capacity

  17. def finalize (): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  18. def getClass (): java.lang.Class[_]

    Attributes
    final
    Definition Classes
    AnyRef → Any
  19. def hashCode (): Int

    Definition Classes
    DefaultResizer → AnyRef → Any
  20. def isInstanceOf [T0] : Boolean

    Attributes
    final
    Definition Classes
    Any
  21. def isTimeForResize (messageCounter: Long): Boolean

    Is it time for resizing.

    Is it time for resizing. Typically implemented with modulo of nth message, but could be based on elapsed time or something else. The messageCounter starts with 0 for the initial resize and continues with 1 for the first message. Make sure to perform initial resize before first message (messageCounter == 0), because there is no guarantee that resize will be done when concurrent messages are in play.

    CAUTION: this method is invoked from the thread which tries to send a message to the pool, i.e. the ActorRef.!() method, hence it may be called concurrently.

    Definition Classes
    DefaultResizerResizer
  22. val lowerBound : Int

  23. val messagesPerResize : Int

  24. def ne (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  25. def notify (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  26. def notifyAll (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  27. def pressure (routees: IndexedSeq[ActorRef]): Int

    Number of routees considered busy, or above 'pressure level'.

    Number of routees considered busy, or above 'pressure level'.

    Implementation depends on the value of pressureThreshold (default is 1).

    • 0: number of routees currently processing a message.
    • 1: number of routees currently processing a message has some messages in mailbox.
    • > 1: number of routees with at least the configured pressureThreshold messages in their mailbox. Note that estimating mailbox size of default UnboundedMailbox is O(N) operation.
    routees

    the current resizer of routees

    returns

    number of busy routees, between 0 and routees.size

  28. val pressureThreshold : Int

  29. def productArity : Int

    Definition Classes
    DefaultResizer → Product
  30. def productElement (arg0: Int): Any

    Definition Classes
    DefaultResizer → Product
  31. def productIterator : Iterator[Any]

    Definition Classes
    Product
  32. def productPrefix : String

    Definition Classes
    DefaultResizer → Product
  33. def rampup (pressure: Int, capacity: Int): Int

    Computes a proposed positive (or zero) capacity delta using the configured rampupRate.

    Computes a proposed positive (or zero) capacity delta using the configured rampupRate.

    pressure

    the current number of busy routees

    capacity

    the current number of total routees

    returns

    proposed increase in capacity

  34. val rampupRate : Double

  35. def resize (props: Props, routeeProvider: RouteeProvider): Unit

    Decide if the capacity of the router need to be changed.

    Decide if the capacity of the router need to be changed. Will be invoked when isTimeForResize returns true and no other resize is in progress. Create and register more routees with routeeProvider.registerRoutees(newRoutees) or remove routees with routeeProvider.unregisterRoutees(abandonedRoutees) and sending [[akka.actor.PoisonPill]] to them. This method is invoked only in the context of the Router actor in order to safely create/stop children.

    Definition Classes
    DefaultResizerResizer
  36. val stopDelay : Duration

  37. def synchronized [T0] (arg0: ⇒ T0): T0

    Attributes
    final
    Definition Classes
    AnyRef
  38. def toString (): String

    Definition Classes
    DefaultResizer → AnyRef → Any
  39. val upperBound : Int

  40. def wait (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()
  41. def wait (arg0: Long, arg1: Int): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()
  42. def wait (arg0: Long): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()

Deprecated Value Members

  1. def productElements : Iterator[Any]

    Definition Classes
    Product
    Annotations
    @deprecated
    Deprecated

    use productIterator instead

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Resizer

Inherited from AnyRef

Inherited from Any