Renaming sendOneWay to tell, closing ticket #1072
This commit is contained in:
parent
29ca6a867b
commit
04729bcbc3
32 changed files with 94 additions and 94 deletions
|
|
@ -456,14 +456,14 @@ Let's capture this in code::
|
|||
if (message instanceof Calculate) {
|
||||
// schedule work
|
||||
for (int start = 0; start < nrOfMessages; start++) {
|
||||
router.sendOneWay(new Work(start, nrOfElements), getContext());
|
||||
router.tell(new Work(start, nrOfElements), getContext());
|
||||
}
|
||||
|
||||
// send a PoisonPill to all workers telling them to shut down themselves
|
||||
router.sendOneWay(new Broadcast(poisonPill()));
|
||||
router.tell(new Broadcast(poisonPill()));
|
||||
|
||||
// send a PoisonPill to the router, telling him to shut himself down
|
||||
router.sendOneWay(poisonPill());
|
||||
router.tell(poisonPill());
|
||||
|
||||
} else if (message instanceof Result) {
|
||||
|
||||
|
|
@ -502,7 +502,7 @@ Now the only thing that is left to implement is the runner that should bootstrap
|
|||
}).start();
|
||||
|
||||
// start the calculation
|
||||
master.sendOneWay(new Calculate());
|
||||
master.tell(new Calculate());
|
||||
|
||||
// wait for master to shut down
|
||||
latch.await();
|
||||
|
|
@ -646,14 +646,14 @@ Before we package it up and run it, let's take a look at the full code now, with
|
|||
if (message instanceof Calculate) {
|
||||
// schedule work
|
||||
for (int start = 0; start < nrOfMessages; start++) {
|
||||
router.sendOneWay(new Work(start, nrOfElements), getContext());
|
||||
router.tell(new Work(start, nrOfElements), getContext());
|
||||
}
|
||||
|
||||
// send a PoisonPill to all workers telling them to shut down themselves
|
||||
router.sendOneWay(new Broadcast(poisonPill()));
|
||||
router.tell(new Broadcast(poisonPill()));
|
||||
|
||||
// send a PoisonPill to the router, telling him to shut himself down
|
||||
router.sendOneWay(poisonPill());
|
||||
router.tell(poisonPill());
|
||||
|
||||
} else if (message instanceof Result) {
|
||||
|
||||
|
|
@ -698,7 +698,7 @@ Before we package it up and run it, let's take a look at the full code now, with
|
|||
}).start();
|
||||
|
||||
// start the calculation
|
||||
master.sendOneWay(new Calculate());
|
||||
master.tell(new Calculate());
|
||||
|
||||
// wait for master to shut down
|
||||
latch.await();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue