Package org.apache.stratos.cloud.controller.concurrent

Examples of org.apache.stratos.cloud.controller.concurrent.ThreadExecutor


            validateCartridge(parser);
           
      // deploy - grab cartridges
      List<Cartridge> cartridges = parser.getCartridgesList();

      ThreadExecutor exec = new ThreadExecutor(3);
      // create Jclouds objects, for each IaaS
      for (Cartridge cartridge : cartridges) {
        // jclouds object building is time consuming, hence I use Java executor framework
        exec.execute(new JcloudsObjectBuilder(cartridge, deploymentFileData));
      }
      exec.shutdown();
      // update map
      fileToCartridgeListMap.put(deploymentFileData.getAbsolutePath(),
                                 new ArrayList<Cartridge>(cartridges));

      log.info("Successfully deployed the Cartridge definition specified at "+deploymentFileData.getAbsolutePath());
View Full Code Here


                                                                                  template);

            node = nodes.iterator().next();
            //Start allocating ip as a new job

            ThreadExecutor exec = ThreadExecutor.getInstance();
            exec.execute(new IpAllocator(memberContext, iaasProvider, cartridgeType, node));


            // node id
            String nodeId = node.getId();
            if (nodeId == null) {
View Full Code Here

            String msg = "Termination failed. Invalid Member Id: "+memberId;
            log.error(msg);
            throw new InvalidMemberException(msg);
        }
       
        ThreadExecutor exec = ThreadExecutor.getInstance();
        exec.execute(new InstanceTerminator(ctxt));

  }
View Full Code Here

        String msg = "Instance termination failed. No members found for cluster id: "+clusterId;
        log.warn(msg);
            return;
    }
   
    ThreadExecutor exec = ThreadExecutor.getInstance();
    for (MemberContext memberContext : ctxts) {
            exec.execute(new InstanceTerminator(memberContext));
        }

  }
View Full Code Here

TOP

Related Classes of org.apache.stratos.cloud.controller.concurrent.ThreadExecutor

Copyright © 2018 www.massapicom. 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.