Added some more comments to ActorPool
This commit is contained in:
parent
04a72b6cd8
commit
98c35ece93
1 changed files with 3 additions and 5 deletions
|
|
@ -35,9 +35,9 @@ object ActorPool {
|
|||
* Defines the nature of an actor pool.
|
||||
*/
|
||||
trait ActorPool {
|
||||
def instance(): ActorRef
|
||||
def capacity(delegates: Seq[ActorRef]): Int
|
||||
def select(delegates: Seq[ActorRef]): Tuple2[Iterator[ActorRef], Int]
|
||||
def instance(): ActorRef //Question, Instance of what?
|
||||
def capacity(delegates: Seq[ActorRef]): Int //Question, What is the semantics of this return value?
|
||||
def select(delegates: Seq[ActorRef]): Tuple2[Iterator[ActorRef], Int] //Question, Why does select return this instead of an ordered Set?
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -46,12 +46,10 @@ trait ActorPool {
|
|||
* - routes the incoming message to a selection set of delegate actors
|
||||
*/
|
||||
trait DefaultActorPool extends ActorPool { this: Actor =>
|
||||
|
||||
import ActorPool._
|
||||
import collection.mutable.LinkedList
|
||||
import akka.actor.MaximumNumberOfRestartsWithinTimeRangeReached
|
||||
|
||||
|
||||
protected var _delegates = Vector[ActorRef]()
|
||||
private var _lastCapacityChange = 0
|
||||
private var _lastSelectorCount = 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue