コード例 #1
0
  public TestNode createRMNodeStarterNode(String nodeName)
      throws IOException, NodeException, InterruptedException {

    int pnpPort = RMTHelper.findFreePort();
    String nodeUrl = "pnp://localhost:" + pnpPort + "/" + nodeName;
    Map<String, String> vmParameters = new HashMap<>();
    vmParameters.put(PNPConfig.PA_PNP_PORT.getName(), Integer.toString(pnpPort));
    JVMProcessImpl nodeProcess =
        RMTHelper.createJvmProcess(
            RMNodeStarter.class.getName(),
            Arrays.asList("-n", nodeName, "-r", getLocalUrl(), "-Dproactive.net.nolocal=false"),
            vmParameters,
            null);
    return RMTHelper.createNode(nodeName, nodeUrl, nodeProcess);
  }
コード例 #2
0
 public void addExtraNodes(int nbNodes) throws Exception {
   RMTHelper.createNodeSource("extra", nbNodes, getResourceManager(), getRMMonitorsHandler());
 }
コード例 #3
0
 public void waitForNodeSourceEvent(RMEventType nodesourceCreated, String nsName)
     throws Exception {
   RMTHelper.waitForNodeSourceEvent(nodesourceCreated, nsName, getRMMonitorsHandler());
 }
コード例 #4
0
 public RMNodeEvent waitForAnyNodeEvent(RMEventType nodeStateChanged) throws Exception {
   return RMTHelper.waitForAnyNodeEvent(nodeStateChanged, getRMMonitorsHandler());
 }
コード例 #5
0
 public void killNode(String url) throws NodeException {
   RMTHelper.killNode(url);
 }
コード例 #6
0
 public RMNodeEvent waitForNodeEvent(RMEventType nodeAdded, String nodeUrl, long timeout)
     throws Exception {
   return RMTHelper.waitForNodeEvent(nodeAdded, nodeUrl, timeout, getRMMonitorsHandler());
 }
コード例 #7
0
 public TestNode createNode(String nodeName)
     throws InterruptedException, NodeException, IOException {
   return RMTHelper.createNode(nodeName);
 }
コード例 #8
0
 public void createNodeSource(int nbNodes, List<String> vmOptions) throws Exception {
   RMTHelper.createNodeSource(nbNodes, vmOptions, getResourceManager(), getRMMonitorsHandler());
 }