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,21 @@
|
|||
package akka.docs.routing
|
||||
|
||||
import akka.routing.{ BasicNoBackoffFilter, SmallestMailboxSelector, DefaultActorPool }
|
||||
import akka.actor.{ ActorRef, Props, Actor }
|
||||
|
||||
//#testPool
|
||||
class TestPool extends Actor with DefaultActorPool with SmallestMailboxSelector with BasicNoBackoffFilter {
|
||||
|
||||
def capacity(delegates: Seq[ActorRef]) = 5
|
||||
protected def receive = _route
|
||||
def rampupRate = 0.1
|
||||
def selectionCount = 1
|
||||
def partialFill = true
|
||||
|
||||
def instance(defaults: Props) = context.actorOf(defaults.withCreator(new Actor {
|
||||
def receive = {
|
||||
case _ ⇒ // do something
|
||||
}
|
||||
}))
|
||||
}
|
||||
//#testPool
|
||||
Loading…
Add table
Add a link
Reference in a new issue