Rename local val _routee, see #2442
This commit is contained in:
parent
fa0ec4bd01
commit
305dceb102
1 changed files with 6 additions and 6 deletions
|
|
@ -517,9 +517,9 @@ trait RoundRobinLike { this: RouterConfig ⇒
|
|||
val next = new AtomicLong(0)
|
||||
|
||||
def getNext(): ActorRef = {
|
||||
val _routees = routeeProvider.routees
|
||||
if (_routees.isEmpty) routeeProvider.context.system.deadLetters
|
||||
else _routees((next.getAndIncrement % _routees.size).asInstanceOf[Int])
|
||||
val currentRoutees = routeeProvider.routees
|
||||
if (currentRoutees.isEmpty) routeeProvider.context.system.deadLetters
|
||||
else currentRoutees((next.getAndIncrement % currentRoutees.size).asInstanceOf[Int])
|
||||
}
|
||||
|
||||
{
|
||||
|
|
@ -634,9 +634,9 @@ trait RandomLike { this: RouterConfig ⇒
|
|||
routeeProvider.createAndRegisterRoutees(props, nrOfInstances, routees)
|
||||
|
||||
def getNext(): ActorRef = {
|
||||
val _routees = routeeProvider.routees
|
||||
if (_routees.isEmpty) routeeProvider.context.system.deadLetters
|
||||
else _routees(ThreadLocalRandom.current.nextInt(_routees.size))
|
||||
val currentRoutees = routeeProvider.routees
|
||||
if (currentRoutees.isEmpty) routeeProvider.context.system.deadLetters
|
||||
else currentRoutees(ThreadLocalRandom.current.nextInt(currentRoutees.size))
|
||||
}
|
||||
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue