use of com.nokia.dempsy.router.DecentralizedRoutingStrategy in project Dempsy by Dempsy.
the class TestZookeeperClusterResilience method getDempsyFor.
private static Dempsy getDempsyFor(ClusterId clusterId, ApplicationDefinition ad) throws Throwable {
//------------------------------------------------------------------------------
// here is a complete non-spring, non-DI Dempsy instantiation
//------------------------------------------------------------------------------
List<ApplicationDefinition> ads = new ArrayList<ApplicationDefinition>();
ads.add(ad);
Dempsy dempsy = new Dempsy();
dempsy.setApplicationDefinitions(ads);
dempsy.setClusterCheck(new SpecificClusterCheck(clusterId));
dempsy.setDefaultRoutingStrategy(new DecentralizedRoutingStrategy(20, 1));
dempsy.setDefaultSerializer(new JavaSerializer<Object>());
dempsy.setDefaultStatsCollectorFactory(new StatsCollectorFactoryCoda());
dempsy.setDefaultTransport(new TcpTransport());
return dempsy;
}
Aggregations