Class DefaultResizer$

java.lang.Object
org.apache.pekko.routing.DefaultResizer$
All Implemented Interfaces:
Serializable, scala.Equals, scala.Product

public class DefaultResizer$ extends Object implements scala.Product, Serializable
See Also:
  • Field Details

    • MODULE$

      public static final DefaultResizer$ MODULE$
      Static reference to the singleton instance of this Scala object.
  • Constructor Details

    • DefaultResizer$

      public DefaultResizer$()
  • Method Details

    • $lessinit$greater$default$1

      public int $lessinit$greater$default$1()
      Implementation of Resizer that adjust the Pool based on specified thresholds.
      Parameters:
      lowerBound - The fewest number of routees the router should ever have.
      upperBound - The most number of routees the router should ever have. Must be greater than or equal to lowerBound.
      pressureThreshold - Threshold to evaluate if routee is considered to be busy (under pressure). Implementation depends on this value (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.
      rampupRate - Percentage to increase capacity whenever all routees are busy. For example, 0.2 would increase 20% (rounded up), i.e. if current capacity is 6 it will request an increase of 2 more routees.
      backoffThreshold - Minimum fraction of busy routees before backing off. For example, if this is 0.3, then we'll remove some routees only when less than 30% of routees are busy, i.e. if current capacity is 10 and 3 are busy then the capacity is unchanged, but if 2 or less are busy the capacity is decreased. Use 0.0 or negative to avoid removal of routees.
      backoffRate - Fraction of routees to be removed when the resizer reaches the backoffThreshold. For example, 0.1 would decrease 10% (rounded up), i.e. if current capacity is 9 it will request an decrease of 1 routee.
      messagesPerResize - Number of messages between resize operation. Use 1 to resize before each message.
    • $lessinit$greater$default$2

      public int $lessinit$greater$default$2()
    • $lessinit$greater$default$3

      public int $lessinit$greater$default$3()
    • $lessinit$greater$default$4

      public double $lessinit$greater$default$4()
    • $lessinit$greater$default$5

      public double $lessinit$greater$default$5()
    • $lessinit$greater$default$6

      public double $lessinit$greater$default$6()
    • $lessinit$greater$default$7

      public int $lessinit$greater$default$7()
    • apply

      public DefaultResizer apply(com.typesafe.config.Config resizerConfig)
    • apply$default$1

      public int apply$default$1()
      Implementation of Resizer that adjust the Pool based on specified thresholds.
      Parameters:
      lowerBound - The fewest number of routees the router should ever have.
      upperBound - The most number of routees the router should ever have. Must be greater than or equal to lowerBound.
      pressureThreshold - Threshold to evaluate if routee is considered to be busy (under pressure). Implementation depends on this value (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.
      rampupRate - Percentage to increase capacity whenever all routees are busy. For example, 0.2 would increase 20% (rounded up), i.e. if current capacity is 6 it will request an increase of 2 more routees.
      backoffThreshold - Minimum fraction of busy routees before backing off. For example, if this is 0.3, then we'll remove some routees only when less than 30% of routees are busy, i.e. if current capacity is 10 and 3 are busy then the capacity is unchanged, but if 2 or less are busy the capacity is decreased. Use 0.0 or negative to avoid removal of routees.
      backoffRate - Fraction of routees to be removed when the resizer reaches the backoffThreshold. For example, 0.1 would decrease 10% (rounded up), i.e. if current capacity is 9 it will request an decrease of 1 routee.
      messagesPerResize - Number of messages between resize operation. Use 1 to resize before each message.
    • apply$default$2

      public int apply$default$2()
    • apply$default$3

      public int apply$default$3()
    • apply$default$4

      public double apply$default$4()
    • apply$default$5

      public double apply$default$5()
    • apply$default$6

      public double apply$default$6()
    • apply$default$7

      public int apply$default$7()
    • fromConfig

      public scala.Option<DefaultResizer> fromConfig(com.typesafe.config.Config resizerConfig)
    • apply

      public DefaultResizer apply(int lowerBound, int upperBound, int pressureThreshold, double rampupRate, double backoffThreshold, double backoffRate, int messagesPerResize)
      Implementation of Resizer that adjust the Pool based on specified thresholds.
      Parameters:
      lowerBound - The fewest number of routees the router should ever have.
      upperBound - The most number of routees the router should ever have. Must be greater than or equal to lowerBound.
      pressureThreshold - Threshold to evaluate if routee is considered to be busy (under pressure). Implementation depends on this value (default is 1).
      • 0: number of routees currently processing a message.
      • 1: number of routees currently processing a message has some messages in mailbox.
      • &gt; 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.
      rampupRate - Percentage to increase capacity whenever all routees are busy. For example, 0.2 would increase 20% (rounded up), i.e. if current capacity is 6 it will request an increase of 2 more routees.
      backoffThreshold - Minimum fraction of busy routees before backing off. For example, if this is 0.3, then we'll remove some routees only when less than 30% of routees are busy, i.e. if current capacity is 10 and 3 are busy then the capacity is unchanged, but if 2 or less are busy the capacity is decreased. Use 0.0 or negative to avoid removal of routees.
      backoffRate - Fraction of routees to be removed when the resizer reaches the backoffThreshold. For example, 0.1 would decrease 10% (rounded up), i.e. if current capacity is 9 it will request an decrease of 1 routee.
      messagesPerResize - Number of messages between resize operation. Use 1 to resize before each message.
    • unapply

      public scala.Option<scala.Tuple7<Object,Object,Object,Object,Object,Object,Object>> unapply(DefaultResizer x$0)
    • productPrefix

      public String productPrefix()
      Specified by:
      productPrefix in interface scala.Product
    • productArity

      public int productArity()
      Specified by:
      productArity in interface scala.Product
    • productElement

      public Object productElement(int x$1)
      Specified by:
      productElement in interface scala.Product
    • productIterator

      public scala.collection.Iterator<Object> productIterator()
      Specified by:
      productIterator in interface scala.Product
    • canEqual

      public boolean canEqual(Object x$1)
      Specified by:
      canEqual in interface scala.Equals
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object