Examples of ResourceAllocation


Examples of hu.u_szeged.nbo.client.model.ResourceAllocation

    for (Iterator iterator = selection.iterator(); iterator.hasNext();) {
      Model model = (Model)iterator.next();
     
      if (model instanceof ResourceAllocation) {
        ResourceAllocationPerspective perspective = mainWindow.getRAPerspective();
        ResourceAllocation raProblem = (ResourceAllocation) model;
               
        if ((raProblem.isStarted()) && (!raProblem.isFailed()) && (!raProblem.isSolved())) {
          raProblem.getSolverThread().stopSolving();
          SolutionMonitorThread.monitors.get(raProblem.getName()).stopMonitoring(); // FIX: started problem fails to stop
        }
       
        raProblem.clear();
       
        perspective.clearSolutionTables(raProblem.getName());
        perspective.clearText();
        perspective.setSummaryText(raProblem.getSummary());
        perspective.getAlgSelector().select(raProblem.getAlgorithmIndex(raProblem.getAlgorithm()));
       
        Text mText =
                (Text)perspective.getOptionsGroup().getChildren()[ResourceAllocationPerspective.M_TEXT];
             
                mText.setEnabled(false);
                mText.setText("1");
               
              perspective.getAlgSelector().setEnabled(true);
              perspective.getOptionsGroup().setEnabled(true);
             
              ClientLogManager.addUserLog("Results cleared for problem " + raProblem
                  + " [#" + raProblem.getUniqueID() + "].", false);
      }
       
      mainWindow.getProblemBrowserTree().getTreeViewer().refresh();
       
    }
View Full Code Here

Examples of org.globus.workspace.client_core.repr.ResourceAllocation

        final ResourceAllocation_Type ra = this.req.getResourceAllocation();
        if (ra == null) {
            throw new ParameterProblem("(?) no ResourceAllocation_Type");
        }

        workspace.setRequestedResourceAllocation(new ResourceAllocation(ra));
        // this is intentionally a separate object:
        workspace.setCurrentResourceAllocation(new ResourceAllocation(ra));

        boolean trash = false;

        if (this.req.getShutdownMechanism() != null
            && this.req.getShutdownMechanism().equals(
View Full Code Here

Examples of org.nimbustools.api.repr.vm.ResourceAllocation

        if (req == null) {
            throw new IllegalArgumentException("req may not be null");
        }

        final ResourceAllocation requestedRA = req.getRequestedRA();
        if (requestedRA == null) {
            throw new IllegalArgumentException("requestedRA may not be null");
        }

        final int numNodes = req.getRequestedRA().getNodeNumber();
View Full Code Here

Examples of org.nimbustools.api.repr.vm.ResourceAllocation

            String groupName = groupAuthz.getGroupName(creatorId);
            String state = vm.getState().getState();
            String startTime = vm.getSchedule().getStartTime().getTime().toString();
            String endTime = vm.getSchedule().getDestructionTime().getTime().toString();

            ResourceAllocation ra = vm.getResourceAllocation();
            String memory = Integer.toString(ra.getMemory());
            String cpuCount = Integer.toString(ra.getIndCpuCount());
            String uri = vm.getVMFiles()[0].getURI().getPath();

            VMTranslation vmt = new VMTranslation(id, node, creatorId, groupId, groupName, state, startTime, endTime,
                    memory, cpuCount, uri);
            return vmt;
View Full Code Here

Examples of org.nimbustools.api.repr.vm.ResourceAllocation

            throw new CannotTranslateException(
                    "ProcessorArchitectureEnumeration contains " +
                            "unrecognized value '" + archEnum.toString() + "'");
        }

        ResourceAllocation ra = req.getRequestedRA();
        if (ra == null) {
            ra = this.repr._newResourceAllocation();
            req.setRequestedRA(ra);
        }
        if (!(ra instanceof _ResourceAllocation)) {
View Full Code Here

Examples of org.nimbustools.api.repr.vm.ResourceAllocation

            throw new CannotTranslateException("vm may not be null");
        }

        final ResourceAllocation_Type alloc = new ResourceAllocation_Type();

        final ResourceAllocation ra = vm.getResourceAllocation();
        if (ra == null) {
            return alloc; // *** EARLY RETURN ***
        }

        this.setCPU(ra, alloc);

        final int raMem = ra.getMemory();
        if (raMem > -1) {
            final Exact_Type ex = new Exact_Type(raMem);
            final Exact_Type[] exacts = {ex};
            alloc.setIndividualPhysicalMemory(
                    new RangeValue_Type(exacts,null,null,null));
        }

        final int raCpus = ra.getIndCpuCount();
        if (raCpus > -1) {
            final Exact_Type ex = new Exact_Type(raCpus);
            final Exact_Type[] exacts = {ex};
            alloc.setIndividualCPUCount(
                    new RangeValue_Type(exacts,null,null,null));
        }

        final int raCpuPercent = ra.getCpuPercentage();
        if (raCpuPercent > -1) {
            final Exact_Type ex = new Exact_Type(raCpuPercent);
            final Exact_Type[] exacts = {ex};
            alloc.setCPUPercentage(
                    new RangeValue_Type(exacts,null,null,null));
View Full Code Here

Examples of org.nimbustools.api.repr.vm.ResourceAllocation

            custRequests = null;
        }


        final String raType = launchSpec.getInstanceType();
        final ResourceAllocation ra = this.RAs.getMatchingRA(raType,
                                                             req.getInstanceCount().intValue(),
                                                             req.getInstanceCount().intValue(),
                                                             true);
        final NIC[] nics = this.getNICs(ra.getPublicNetwork(), ra.getPrivateNetwork());

        final RequiredVMM reqVMM = this.RAs.getRequiredVMM();

        String userData = null;
        final UserDataType t_userData = launchSpec.getUserData();
View Full Code Here

Examples of org.nimbustools.api.repr.vm.ResourceAllocation

        if (vm == null) {
            throw new CannotTranslateException("vm is missing");
        }

        final ResourceAllocation ra = vm.getResourceAllocation();
        if (ra == null) {
            throw new CannotTranslateException("ra is missing");
        }

        return this.RAs.getMatchingName(vm, ra, this.networks.getManagerPublicNetworkName(), this.networks.getManagerPrivateNetworkName());
View Full Code Here

Examples of org.nimbustools.api.repr.vm.ResourceAllocation

        } else {
            custRequests = null;
        }

        final String raType = req.getInstanceType();
        final ResourceAllocation ra = this.RAs.getMatchingRA(raType,
                                                             req.getMinCount(),
                                                             req.getMaxCount(),
                                                             false);
        final NIC[] nics = this.getNICs(ra.getPublicNetwork(), ra.getPrivateNetwork());
        final RequiredVMM reqVMM = this.RAs.getRequiredVMM();

        String userData = null;
        final UserDataType t_userData = req.getUserData();
        if (t_userData != null) {
View Full Code Here

Examples of org.nimbustools.api.repr.vm.ResourceAllocation

        if (request.getRequestedSchedule() != null) {
            requestDuration = request.getRequestedSchedule().getDurationSeconds();
        }

        final ResourceAllocation ra = request.getRequestedRA();
        if (ra != null) {
            requestMemory = ra.getMemory();
            requestCpuCount = ra.getIndCpuCount();
        }

        final String msg = logId + "Idempotent request failed because of a parameter mismatch: ";
        if (instanceDuration != null && requestDuration != null) {
            if (!instanceDuration.equals(requestDuration)) {
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.