Commit graph

8 commits

Author SHA1 Message Date
Patrik Nordwall
c84e05a779 Organize imports, see #2103 2012-08-30 13:52:47 +02:00
Patrik Nordwall
fd847535d4 Reduce exposure of ActorContext to RouteeProvider
* Introduced RouterContext which is a subset of
  ActorContext that makes sense for RouteeProvider
  to use.
* It's not possible (without major rethinking) to
  create routees by sending message to the Router
  actor because we rely on immediate return of ActorRef
2012-08-30 13:12:23 +02:00
Patrik Nordwall
e422d188c2 Use the router actor as cluster listener, see #2103
* Removed need for extra actor that subscribes to cluster
  events
* ClusterRouterActor is the router actor and aslo subscribes
* Less scary initialization, and safe calls to createRoutees
* Intercept ClusterDomainEvent to route them to ClusterRouterActor
  instead of to the routees
2012-08-30 12:13:50 +02:00
Patrik Nordwall
ba5df98740 Unregister routees living on removed node, see #2103 2012-08-30 10:54:58 +02:00
Patrik Nordwall
b22a092932 Support programatic declaration of cluster router, see #2103
* Ordinary withRouther withDeploy is TOO ugly for this
* Implicit conversion adds withClusterRouter to Props
  for Scala API
* Helper method in ClusterRouterPropsDecorator for Java API
2012-08-30 10:06:12 +02:00
Patrik Nordwall
695ce49727 Deploy to new members in cluster, see #2103
* Config max-nr-of-instances-per-node
* selectDeploymentTarget that takes max-nr-of-instances-per-node
  and nr-of-instances into account
* Deploy when new member added or removed
* Moved routeeProps to RouteeProvider constructor, needed for
  this feature, but also simplifies createRoute, createRoutee,
  and resize, since routeeProps doesn't have to be passed around.
2012-08-29 19:33:19 +02:00
Patrik Nordwall
bf20ae5157 Better methods in RouteeProvider
* createRoutees only for new nrOfInstances
* createRoutees also registers
* New registerRouteesFor for path lookup
* removeRoutees to gracefully unregister and stop routee
2012-08-29 14:56:51 +02:00
Patrik Nordwall
417bdc2dfb Prototype of cluster aware routers, see #2103
* Several FIXME that needs to be discussed
* ClusterRouterConfig created via ClusterActorRefProvider
2012-08-28 11:54:52 +02:00