/** * Creates the and start. * * @param main the main * @param workers the workers */ public static void createAndStart( Class<? extends ComponentDefinition> main, int workers) { createAndStart(main, Init.NONE, workers, 1); }
/** * Creates the and start. * * @param main the main */ public static void createAndStart(Class<? extends ComponentDefinition> main) { // createAndStart(main, Runtime.getRuntime().availableProcessors()); createAndStart(main, Init.NONE, 1); }
public static void createAndStart(Class<? extends ComponentDefinition> main, Init initEvent) { createAndStart(main, initEvent, 1); }
public static void createAndStart( Class<? extends ComponentDefinition> main, Init initEvent, int workers) { createAndStart(main, initEvent, workers, 1); }
public static void createAndStart( Class<? extends ComponentDefinition> main, int workers, int maxEventExecuteNumber) { createAndStart(main, Init.NONE, workers, maxEventExecuteNumber); }
public static void main(String[] args) throws UnknownHostException { InetAddress ip = InetAddress.getByName(args[0]); int port = Integer.parseInt(args[1]); Address selfAddress = new NettyAddress(ip, port); Kompics.createAndStart(Parent.class, new Parent.Init(selfAddress), 2, 50); }
public static void main(String[] args) throws UnknownHostException { InetAddress ip = InetAddress.getByName(args[0]); int port = Integer.parseInt(args[1]); Address selfAddress = new NettyAddress(ip, port); InetAddress ip2 = InetAddress.getByName(args[2]); int port2 = Integer.parseInt(args[3]); Address targetAddress = new NettyAddress(ip2, port2); Kompics.createAndStart(Parent.class, new Parent.Init(selfAddress, targetAddress), Receiver.THREADS, 50); }
public static synchronized void runAtLeastTests(NetworkGenerator nGen, int numNodes, Transport[] protos) { LOG.info("\n******************** Running AT LEAST Test ********************\n"); NetworkTest.nGen = nGen; NetworkTest.numNodes = numNodes; NetworkTest.protos = protos; WAIT_FOR.set(1); msgId.set(0); messageStatus.clear(); TestUtil.reset("Datagram test (" + Arrays.toString(NetworkTest.protos) + ") Nodes #" + numNodes, 10000); //10 sec timeout for all the connections to be dropped properly Kompics.createAndStart(LauncherComponent.class, 8, 50); for (int i = 0; i < numNodes; i++) { LOG.info("Waiting for {}/{} STOPPED.", i + 1, numNodes); TestUtil.waitFor(STOPPED); LOG.info("Got {}/{} STOPPED.", i + 1, numNodes); } LOG.info("\n******************** Shutting Down Kompics ********************\n"); Kompics.shutdown(); assertTrue(numNodes <= messageStatus.size()); LOG.info("\n******************** AT LEAST Test Done ********************\n"); }
TestUtil.reset("Stream test (" + Arrays.toString(NetworkTest.protos) + ") Nodes #" + numNodes, 100000); //10 sec timeout for all the connections to be dropped properly Kompics.createAndStart(LauncherComponent.class, 8, 50); Kompics.createAndStart(FRLauncher.class, 8, 50); TestUtil.reset("FR test (" + Arrays.toString(NetworkTest.protos) + ")", 100000); //10 sec timeout for all the connections to be dropped properly Kompics.createAndStart(FRLauncher.class, 8, 50);