pjfanning commented on code in PR #3393:
URL: https://github.com/apache/pekko/pull/3393#discussion_r3664166756
##########
actor/src/main/scala/org/apache/pekko/routing/Resizer.scala:
##########
@@ -63,6 +63,16 @@ trait Resizer {
*/
def resize(currentRoutees: immutable.IndexedSeq[Routee]): Int
+ /**
+ * Constrain a proposed total pool size to the bounds enforced by this
resizer.
+ * Used by [[AdjustPoolSize]] management messages to respect resizer bounds.
+ * The default implementation only ensures the size is at least 1.
+ *
+ * @param proposedSize the proposed total number of routees
+ * @return the clamped pool size
+ */
+ def clamp(proposedSize: Int): Int = math.max(1, proposedSize)
Review Comment:
`@since 2.0.0`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]