=doc #3689 Don't rewrite arrows in doc and samples
This commit is contained in:
parent
37f8f2831b
commit
5a019c0a7a
61 changed files with 531 additions and 517 deletions
|
|
@ -50,7 +50,7 @@ akka.actor.deployment {
|
|||
class RedundancyRoutingLogic(nbrCopies: Int) extends RoutingLogic {
|
||||
val roundRobin = RoundRobinRoutingLogic()
|
||||
def select(message: Any, routees: immutable.IndexedSeq[Routee]): Routee = {
|
||||
val targets = (1 to nbrCopies).map(_ ⇒ roundRobin.select(message, routees))
|
||||
val targets = (1 to nbrCopies).map(_ => roundRobin.select(message, routees))
|
||||
SeveralRoutees(targets)
|
||||
}
|
||||
}
|
||||
|
|
@ -58,7 +58,7 @@ akka.actor.deployment {
|
|||
|
||||
class Storage extends Actor {
|
||||
def receive = {
|
||||
case x ⇒ sender ! x
|
||||
case x => sender ! x
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -99,7 +99,7 @@ class CustomRouterDocSpec extends AkkaSpec(CustomRouterDocSpec.config) with Impl
|
|||
//#unit-test-logic
|
||||
val logic = new RedundancyRoutingLogic(nbrCopies = 3)
|
||||
|
||||
val routees = for (n ← 1 to 7) yield TestRoutee(n)
|
||||
val routees = for (n <- 1 to 7) yield TestRoutee(n)
|
||||
|
||||
val r1 = logic.select("msg", routees)
|
||||
r1.asInstanceOf[SeveralRoutees].routees must be(
|
||||
|
|
@ -118,16 +118,16 @@ class CustomRouterDocSpec extends AkkaSpec(CustomRouterDocSpec.config) with Impl
|
|||
|
||||
"demonstrate usage of custom router" in {
|
||||
//#usage-1
|
||||
for (n ← 1 to 10) system.actorOf(Props[Storage], "s" + n)
|
||||
for (n <- 1 to 10) system.actorOf(Props[Storage], "s" + n)
|
||||
|
||||
val paths = for (n ← 1 to 10) yield ("/user/s" + n)
|
||||
val paths = for (n <- 1 to 10) yield ("/user/s" + n)
|
||||
val redundancy1: ActorRef =
|
||||
system.actorOf(RedundancyGroup(paths, nbrCopies = 3).props(),
|
||||
name = "redundancy1")
|
||||
redundancy1 ! "important"
|
||||
//#usage-1
|
||||
|
||||
for (_ ← 1 to 3) expectMsg("important")
|
||||
for (_ <- 1 to 3) expectMsg("important")
|
||||
|
||||
//#usage-2
|
||||
val redundancy2: ActorRef = system.actorOf(FromConfig.props(),
|
||||
|
|
@ -135,7 +135,7 @@ class CustomRouterDocSpec extends AkkaSpec(CustomRouterDocSpec.config) with Impl
|
|||
redundancy2 ! "very important"
|
||||
//#usage-2
|
||||
|
||||
for (_ ← 1 to 5) expectMsg("very important")
|
||||
for (_ <- 1 to 5) expectMsg("very important")
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue