This is an automated email from the ASF dual-hosted git repository.

He-Pin pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pekko.git


The following commit(s) were added to refs/heads/main by this push:
     new 310711cf5d deprecate BalancingDispatcherConfigurator and mark as 
internal API (#3391)
310711cf5d is described below

commit 310711cf5d3363c705a9f06bac97c4c8cafb7f45
Author: He-Pin(kerr) <[email protected]>
AuthorDate: Mon Jul 27 22:38:58 2026 +0800

    deprecate BalancingDispatcherConfigurator and mark as internal API (#3391)
    
    Motivation:
    BalancingDispatcher has been deprecated since Akka 2.3 with the
    recommendation to use BalancingPool instead. The configurator class
    remained public and unmarked. Since Pekko 2.0.0 is a major release,
    it is time to deprecate and restrict visibility.
    
    Modification:
    - Add @deprecated annotation to BalancingDispatcherConfigurator
    - Mark the class as private[pekko] (INTERNAL API)
    - Add @nowarn to BalancingPool which uses it internally
    - Update Scaladoc to indicate INTERNAL API
    
    Result:
    BalancingDispatcherConfigurator is no longer part of the public API.
    BalancingPool continues to work as the supported replacement. Users
    who referenced the configurator by full class name in config will see
    deprecation warnings at compile time if they use it directly in code.
    
    Tests:
    - sbt "actor-tests/Test/testOnly 
org.apache.pekko.actor.dispatch.BalancingDispatcherSpec 
org.apache.pekko.actor.dispatch.DispatchersSpec 
org.apache.pekko.actor.ActorConfigurationVerificationSpec" — 33 tests passed
    - sbt "actor-tests/Test/testOnly 
org.apache.pekko.actor.dispatch.BalancingDispatcherModelSpec" — 10 tests passed
    - sbt "actor-tests/Test/testOnly org.apache.pekko.actor.ActorMailboxSpec" — 
33 tests passed
    - sbt "actor/mimaReportBinaryIssues" — no issues
    
    References:
    Refs #3384, Refs #2168
---
 actor/src/main/scala/org/apache/pekko/dispatch/Dispatchers.scala | 5 ++++-
 actor/src/main/scala/org/apache/pekko/routing/Balancing.scala    | 1 +
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/actor/src/main/scala/org/apache/pekko/dispatch/Dispatchers.scala 
b/actor/src/main/scala/org/apache/pekko/dispatch/Dispatchers.scala
index 4c43a2f12b..b35dd9dfd9 100644
--- a/actor/src/main/scala/org/apache/pekko/dispatch/Dispatchers.scala
+++ b/actor/src/main/scala/org/apache/pekko/dispatch/Dispatchers.scala
@@ -319,12 +319,15 @@ private[pekko] object BalancingDispatcherConfigurator {
 }
 
 /**
+ * INTERNAL API
+ *
  * Configurator for creating `BalancingDispatcher`.
  * Returns the same dispatcher instance for each invocation
  * of the `dispatcher()` method.
  */
+@deprecated("Use BalancingPool instead of BalancingDispatcherConfigurator", 
"Pekko 2.0.0")
 @nowarn("msg=deprecated")
-class BalancingDispatcherConfigurator(_config: Config, _prerequisites: 
DispatcherPrerequisites)
+private[pekko] class BalancingDispatcherConfigurator(_config: Config, 
_prerequisites: DispatcherPrerequisites)
     extends 
MessageDispatcherConfigurator(BalancingDispatcherConfigurator.amendConfig(_config),
 _prerequisites) {
 
   private val instance = {
diff --git a/actor/src/main/scala/org/apache/pekko/routing/Balancing.scala 
b/actor/src/main/scala/org/apache/pekko/routing/Balancing.scala
index 309001dd4b..cfa996f803 100644
--- a/actor/src/main/scala/org/apache/pekko/routing/Balancing.scala
+++ b/actor/src/main/scala/org/apache/pekko/routing/Balancing.scala
@@ -79,6 +79,7 @@ private[pekko] final class BalancingRoutingLogic extends 
RoutingLogic {
  * @param routerDispatcher dispatcher to use for the router head actor, which 
handles
  *   supervision, death watch and router management messages
  */
+@nowarn("msg=deprecated")
 @SerialVersionUID(1L)
 final case class BalancingPool(
     nrOfInstances: Int,


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to