|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Resizer
Routers with dynamically resizable number of routees is implemented by providing a Resizer
implementation in RouterConfig
.
Method Summary | |
---|---|
boolean |
isTimeForResize(long messageCounter)
Is it time for resizing. |
void |
resize(RouteeProvider routeeProvider)
Decide if the capacity of the router need to be changed. |
Method Detail |
---|
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.
void resize(RouteeProvider routeeProvider)
isTimeForResize
returns true and no other resize is in progress.
Create and register more routees with routeeProvider.registerRoutees(newRoutees)
or remove routees with
routeeProvider.unregisterRoutees(abandonedRoutees) and
sending PoisonPill
to them.
This method is invoked only in the context of the Router actor in order to safely create/stop children.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |