Search in sources :

Example 1 with SpecificClusterCheck

use of com.nokia.dempsy.router.SpecificClusterCheck 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;
}
Also used : DecentralizedRoutingStrategy(com.nokia.dempsy.router.DecentralizedRoutingStrategy) ApplicationDefinition(com.nokia.dempsy.config.ApplicationDefinition) SpecificClusterCheck(com.nokia.dempsy.router.SpecificClusterCheck) Dempsy(com.nokia.dempsy.Dempsy) ArrayList(java.util.ArrayList) TcpTransport(com.nokia.dempsy.messagetransport.tcp.TcpTransport) StatsCollectorFactoryCoda(com.nokia.dempsy.monitoring.coda.StatsCollectorFactoryCoda)

Aggregations

Dempsy (com.nokia.dempsy.Dempsy)1 ApplicationDefinition (com.nokia.dempsy.config.ApplicationDefinition)1 TcpTransport (com.nokia.dempsy.messagetransport.tcp.TcpTransport)1 StatsCollectorFactoryCoda (com.nokia.dempsy.monitoring.coda.StatsCollectorFactoryCoda)1 DecentralizedRoutingStrategy (com.nokia.dempsy.router.DecentralizedRoutingStrategy)1 SpecificClusterCheck (com.nokia.dempsy.router.SpecificClusterCheck)1 ArrayList (java.util.ArrayList)1