deprecate closure-taking Props factories, see #3081
- base Props on Deploy, Class and Seq[Any] (i.e. constructor args) - remove deprecated Props usage from akka-docs sample code - rewrite UntypedActorDocTestBase - rewrite Java/Scala doc section on actor creation - add migration guide entry
This commit is contained in:
parent
64f664a706
commit
28aad82b1a
80 changed files with 2268 additions and 1641 deletions
|
|
@ -44,7 +44,7 @@ public class RouterViaConfigExample {
|
|||
ActorSystem system = ActorSystem.create("Example", config);
|
||||
//#configurableRouting
|
||||
ActorRef router = system.actorOf(
|
||||
new Props(ExampleActor.class).withRouter(new FromConfig()), "myrouter1");
|
||||
Props.create(ExampleActor.class).withRouter(new FromConfig()), "myrouter1");
|
||||
//#configurableRouting
|
||||
for (int i = 1; i <= 10; i++) {
|
||||
router.tell(new ExampleActor.Message(i), null);
|
||||
|
|
@ -52,7 +52,7 @@ public class RouterViaConfigExample {
|
|||
|
||||
//#configurableRoutingWithResizer
|
||||
ActorRef router2 = system.actorOf(
|
||||
new Props(ExampleActor.class).withRouter(new FromConfig()), "myrouter2");
|
||||
Props.create(ExampleActor.class).withRouter(new FromConfig()), "myrouter2");
|
||||
//#configurableRoutingWithResizer
|
||||
for (int i = 1; i <= 10; i++) {
|
||||
router2.tell(new ExampleActor.Message(i), null);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue