public static void Execute() { try { /* * 1. Create RBroker instance using RBrokerFactory. * * This example creates an anonymous DiscreteTaskBroker. */ DiscreteBrokerConfig brokerConfig = new DiscreteBrokerConfig(Program.DEPLOYR_ENDPOINT, null, 5); RBroker rBroker = RBrokerFactory.discreteTaskBroker(brokerConfig); /* * 2. Create an instance of RTaskAppSimulator. It will drive * RTasks through the RBroker. */ SampleAppSimulation simulation = new SampleAppSimulation(rBroker); /* * 3. Launch RTaskAppSimulator simulation. */ rBroker.simulateApp(simulation); /* * 4. Block until all tasks are complete, and shutdown has been called */ rBroker.waitUntilShutdown(); } catch(Exception tex) { Console.WriteLine("constructor: ex=" + tex.ToString()); } }
static public void Execute() { try { /* * 1. Create RBroker instance using RBrokerFactory. * * This example creates an anonymous DiscreteTaskBroker. */ DiscreteBrokerConfig brokerConfig = new DiscreteBrokerConfig(Program.DEPLOYR_ENDPOINT, null, 5); RBroker rBroker = RBrokerFactory.discreteTaskBroker(brokerConfig); /* * 2. Create an instance of RTaskAppSimulator. It will drive * RTasks through the RBroker. */ SampleAppSimulation simulation = new SampleAppSimulation(rBroker); /* * 3. Launch RTaskAppSimulator simulation. */ rBroker.simulateApp(simulation); /* * 4. Block until all tasks are complete, and shutdown has been called */ rBroker.waitUntilShutdown(); } catch (Exception tex) { Console.WriteLine("constructor: ex=" + tex.ToString()); } }