Package org.apache.pekko.routing
Class DefaultResizer$
java.lang.Object
org.apache.pekko.routing.DefaultResizer$
- All Implemented Interfaces:
Serializable,scala.Equals,scala.Product
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final DefaultResizer$Static reference to the singleton instance of this Scala object. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintintintdoubledoubledoubleintapply(int lowerBound, int upperBound, int pressureThreshold, double rampupRate, double backoffThreshold, double backoffRate, int messagesPerResize) apply(com.typesafe.config.Config resizerConfig) intintintdoubledoubledoubleintbooleanscala.Option<DefaultResizer>fromConfig(com.typesafe.config.Config resizerConfig) inthashCode()intproductElement(int x$1) scala.collection.Iterator<Object>toString()unapply(DefaultResizer x$0) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface scala.Equals
equalsMethods inherited from interface scala.Product
productElementName, productElementNames
-
Field Details
-
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()- 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 tolowerBound.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
pressureThresholdmessages 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
-
apply$default$1
public int apply$default$1()- 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 tolowerBound.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
pressureThresholdmessages 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
-
apply
public DefaultResizer apply(int lowerBound, int upperBound, int pressureThreshold, double rampupRate, double backoffThreshold, double backoffRate, int messagesPerResize) - 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 tolowerBound.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
pressureThresholdmessages 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
-
productPrefix
- Specified by:
productPrefixin interfacescala.Product
-
productArity
public int productArity()- Specified by:
productArityin interfacescala.Product
-
productElement
- Specified by:
productElementin interfacescala.Product
-
productIterator
- Specified by:
productIteratorin interfacescala.Product
-
canEqual
- Specified by:
canEqualin interfacescala.Equals
-
hashCode
public int hashCode() -
toString
-