Package eu.admire.gateway.location.simple

Examples of eu.admire.gateway.location.simple.SimplePartitioner.partition()


        c.addAnnotation(AnnotationKeys.GATEWAY, gw2);
        b.connectInput("in", 0, a.getOutput("out", 0));
        graph.add(a); graph.add(b); graph.add(c);
       
        SimplePartitioner partitioner = new SimplePartitioner();
        Map<GatewayLocation, Graph> partitions = partitioner.partition(graph);
        TestCase.assertEquals(2, partitions.size());
        Graph g = partitions.get(gw1);
        TestCase.assertTrue(g.getNodes().containsAll(Arrays.asList(a, b)));
        g = partitions.get(gw2);
        TestCase.assertTrue(g.getNodes().contains(c));
View Full Code Here


        b.connectInput("in", 0, a.getOutput("out", 0));
        c.connectInput("in", 0, b.getOutput("out", 0));
        graph.add(a); graph.add(b); graph.add(c);
       
        SimplePartitioner partitioner = new SimplePartitioner();
        Map<GatewayLocation, Graph> partitions = partitioner.partition(graph);
        TestCase.assertEquals(1, partitions.size());
        Graph g = partitions.get(gw);
        TestCase.assertEquals(3, g.getNodes().size());
        TestCase.assertTrue(g.getNodes().containsAll(Arrays.asList(a, b, c)));
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.