Replace use of props withCreator in java examples
This commit is contained in:
parent
9b58ecece7
commit
8270b2c038
3 changed files with 10 additions and 10 deletions
|
|
@ -23,8 +23,8 @@ public class TransactorDocTest {
|
|||
//#coordinated-example
|
||||
ActorSystem system = ActorSystem.create("CoordinatedExample");
|
||||
|
||||
ActorRef counter1 = system.actorOf(new Props().withCreator(CoordinatedCounter.class));
|
||||
ActorRef counter2 = system.actorOf(new Props().withCreator(CoordinatedCounter.class));
|
||||
ActorRef counter1 = system.actorOf(new Props(CoordinatedCounter.class));
|
||||
ActorRef counter2 = system.actorOf(new Props(CoordinatedCounter.class));
|
||||
|
||||
Timeout timeout = new Timeout(5, SECONDS);
|
||||
|
||||
|
|
@ -46,7 +46,7 @@ public class TransactorDocTest {
|
|||
//#create-coordinated
|
||||
|
||||
ActorSystem system = ActorSystem.create("CoordinatedApi");
|
||||
ActorRef actor = system.actorOf(new Props().withCreator(Coordinator.class));
|
||||
ActorRef actor = system.actorOf(new Props(Coordinator.class));
|
||||
|
||||
//#send-coordinated
|
||||
actor.tell(new Coordinated(new Message(), timeout));
|
||||
|
|
@ -64,7 +64,7 @@ public class TransactorDocTest {
|
|||
@Test
|
||||
public void counterTransactor() {
|
||||
ActorSystem system = ActorSystem.create("CounterTransactor");
|
||||
ActorRef counter = system.actorOf(new Props().withCreator(Counter.class));
|
||||
ActorRef counter = system.actorOf(new Props(Counter.class));
|
||||
|
||||
Timeout timeout = new Timeout(5, SECONDS);
|
||||
Coordinated coordinated = new Coordinated(timeout);
|
||||
|
|
@ -80,8 +80,8 @@ public class TransactorDocTest {
|
|||
@Test
|
||||
public void friendlyCounterTransactor() {
|
||||
ActorSystem system = ActorSystem.create("FriendlyCounterTransactor");
|
||||
ActorRef friend = system.actorOf(new Props().withCreator(Counter.class));
|
||||
ActorRef friendlyCounter = system.actorOf(new Props().withCreator(FriendlyCounter.class));
|
||||
ActorRef friend = system.actorOf(new Props(Counter.class));
|
||||
ActorRef friendlyCounter = system.actorOf(new Props(FriendlyCounter.class));
|
||||
|
||||
Timeout timeout = new Timeout(5, SECONDS);
|
||||
Coordinated coordinated = new Coordinated(timeout);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue