Package org.ggf.jsdl

Examples of org.ggf.jsdl.RangeValue_Type


        final ResourceAllocation_Type ra = this.req.getResourceAllocation();
        if (ra == null) {
            throw new ParameterProblem("ResourceAllocation is not present");
        }

        final RangeValue_Type rvt =
                this.req.getResourceAllocation().getIndividualPhysicalMemory();
        if (rvt == null) {
            throw new ParameterProblem(
                    "memory specification is not present");
        }
View Full Code Here


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

        final RangeValue_Type memory =  wsra.getIndividualPhysicalMemory();
        if (memory == null) {
            throw new CannotTranslateException("no memory request");
        }

        //TODO: support ranges and Exact_Type[]
        final Exact_Type exact_mem = memory.getExact(0);
        if (exact_mem == null) {
            throw new CannotTranslateException("no exact memory request");
        }

        // casting double
View Full Code Here

        if (wsra == null) {
            // -1 is the default value of CPU count in DefaultResourceAllocation.java
            return -1;
        }

        final RangeValue_Type cores =  wsra.getIndividualCPUCount();
        if (cores == null) {
            // -1 is the default value of CPU count in DefaultResourceAllocation.java
            return -1;
        }

        //TODO: support ranges and Exact_Type[]
        final Exact_Type exact_cores = cores.getExact(0);
        if (exact_cores == null) {
            throw new CannotTranslateException("no exact multi core CPU request");
        }

        // casting double
View Full Code Here

        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));
        }

        return alloc;
    }
View Full Code Here

            }
        }

        final int raSpeed = ra.getIndCpuSpeed();
       
        RangeValue_Type indCPUspeed = null;
        if (raSpeed > -1) {
            final Exact_Type ex = new Exact_Type(raSpeed);
            final Exact_Type[] exacts = {ex};
            indCPUspeed = new RangeValue_Type(exacts,null,null,null);
        }

        if (arch != null || indCPUspeed != null) {

            // each are minOccurs=0
View Full Code Here

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

        final Exact_Type[] exactMemAlloc = {new Exact_Type(memoryMegabytes)};
        final RangeValue_Type memRange = new RangeValue_Type();
        memRange.setExact(exactMemAlloc);
        resAlloc.setIndividualPhysicalMemory(memRange);
    }
View Full Code Here

        if (cores < 1) {
            return;
        }

        final Exact_Type[] exactCoresAlloc = {new Exact_Type(cores)};
        final RangeValue_Type coresRange = new RangeValue_Type();
        coresRange.setExact(exactCoresAlloc);
        resAlloc.setIndividualCPUCount(coresRange);
    }
View Full Code Here

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

        final RangeValue_Type rvt = xmlRA.getIndividualPhysicalMemory();
        if (rvt == null) {
            throw new IllegalArgumentException(
                    "memory specification is not present");
        }
        final GenericIntRange exact = new GenericIntRange(rvt);
View Full Code Here

    private static DiskSpace getDiskSpace(Entry entry) {
        if (entry == null) {
            return null;
        }

        final RangeValue_Type rvt = entry.getIndividualDiskSpace();
        if (rvt != null) {
            final GenericIntRange range = new GenericIntRange(rvt);

            if (range.getMin() != range.getMax()) {
                throw new IllegalArgumentException(
View Full Code Here

TOP

Related Classes of org.ggf.jsdl.RangeValue_Type

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.