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

Examples of org.apache.stratos.cloud.controller.concurrent.ThreadExecutor.execute()


      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));
View Full Code Here


            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

            log.error(msg);
            throw new InvalidMemberException(msg);
        }
       
        ThreadExecutor exec = ThreadExecutor.getInstance();
        exec.execute(new InstanceTerminator(ctxt));

  }
   
    private class InstanceTerminator implements Runnable {
View Full Code Here

            return;
    }
   
    ThreadExecutor exec = ThreadExecutor.getInstance();
    for (MemberContext memberContext : ctxts) {
            exec.execute(new InstanceTerminator(memberContext));
        }

  }

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.