Upgraded routing documentation to Akka 2.0. See #1063
This commit is contained in:
parent
73b79d6e3e
commit
41ce42c8f7
8 changed files with 495 additions and 189 deletions
|
|
@ -0,0 +1,16 @@
|
|||
package akka.docs.routing
|
||||
|
||||
import akka.routing.ActorPool
|
||||
import akka.actor.ActorRef
|
||||
|
||||
//#capacityStrategy
|
||||
trait CapacityStrategy {
|
||||
import ActorPool._
|
||||
|
||||
def pressure(delegates: Seq[ActorRef]): Int
|
||||
def filter(pressure: Int, capacity: Int): Int
|
||||
|
||||
protected def _eval(delegates: Seq[ActorRef]): Int =
|
||||
filter(pressure(delegates), delegates.size)
|
||||
}
|
||||
//#capacityStrategy
|
||||
Loading…
Add table
Add a link
Reference in a new issue