'git mv' rst resources to md
This is mainly intended to keep the git history as neat as possible. No actual conversion yet, so now both the rst and the paradox docs are broken, which will be fixed in the next commits.
This commit is contained in:
parent
5507147073
commit
a4a0d308ad
553 changed files with 0 additions and 0 deletions
|
|
@ -1,48 +0,0 @@
|
|||
/**
|
||||
* Copyright (C) 2009-2017 Lightbend Inc. <http://www.lightbend.com>
|
||||
*/
|
||||
package jdocs.routing;
|
||||
|
||||
//#group
|
||||
import java.util.List;
|
||||
|
||||
import akka.actor.ActorSystem;
|
||||
import akka.dispatch.Dispatchers;
|
||||
import akka.routing.Router;
|
||||
|
||||
import com.typesafe.config.Config;
|
||||
|
||||
import akka.routing.GroupBase;
|
||||
import static jdocs.routing.CustomRouterDocTest.RedundancyRoutingLogic;
|
||||
|
||||
public class RedundancyGroup extends GroupBase {
|
||||
private final List<String> paths;
|
||||
private final int nbrCopies;
|
||||
|
||||
public RedundancyGroup(List<String> paths, int nbrCopies) {
|
||||
this.paths = paths;
|
||||
this.nbrCopies = nbrCopies;
|
||||
}
|
||||
|
||||
public RedundancyGroup(Config config) {
|
||||
this(config.getStringList("routees.paths"),
|
||||
config.getInt("nbr-copies"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public java.lang.Iterable<String> getPaths(ActorSystem system) {
|
||||
return paths;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Router createRouter(ActorSystem system) {
|
||||
return new Router(new RedundancyRoutingLogic(nbrCopies));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String routerDispatcher() {
|
||||
return Dispatchers.DefaultDispatcherId();
|
||||
}
|
||||
|
||||
}
|
||||
//#group
|
||||
Loading…
Add table
Add a link
Reference in a new issue