public interface Resizer
Modifier and Type | Method and Description |
---|---|
boolean |
isTimeForResize(long messageCounter)
Is it time for resizing.
|
int |
resize(scala.collection.immutable.IndexedSeq<Routee> currentRoutees)
Decide if the capacity of the router need to be changed.
|
boolean isTimeForResize(long messageCounter)
CAUTION: this method is invoked from the thread which tries to send a message to the pool, i.e. the ActorRef.!() method, hence it may be called concurrently.
messageCounter
- (undocumented)int resize(scala.collection.immutable.IndexedSeq<Routee> currentRoutees)
isTimeForResize
returns true and no other resize is in progress.
Return the number of routees to add or remove. Negative value will remove that number of routees. Positive value will add that number of routees. 0 will not change the routees.
This method is invoked only in the context of the Router actor.
currentRoutees
- (undocumented)