当前位置: 首页>>代码示例>>Java>>正文


Java PeProvisioner类代码示例

本文整理汇总了Java中org.cloudbus.cloudsim.provisioners.PeProvisioner的典型用法代码示例。如果您正苦于以下问题:Java PeProvisioner类的具体用法?Java PeProvisioner怎么用?Java PeProvisioner使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


PeProvisioner类属于org.cloudbus.cloudsim.provisioners包,在下文中一共展示了PeProvisioner类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: HostBuilder

import org.cloudbus.cloudsim.provisioners.PeProvisioner; //导入依赖的package包/类
private HostBuilder(int numberOfCores, double mips, int ramSize, long bw, long storageCapacity,
        Class<? extends PeProvisioner> cpuProvisionerClass, Class<? extends RamProvisioner> ramProvisionerClass,
        Class<? extends VmScheduler> vmSchedulerClass,
        Class<? extends BwProvisioner> bwProvisionerClass)
{
    this.numberOfCores_ = numberOfCores;
    this.mips_ = mips;
    this.ramSize_ = ramSize;
    this.bw_ = bw;
    this.storageCapacity_ = storageCapacity;
    
    this.cpuProvisionerClass_ = cpuProvisionerClass;
    this.ramProvisionerClass_ = ramProvisionerClass;
    this.vmSchedulerClass_ = vmSchedulerClass;
    this.bwProvisionerClass_ = bwProvisionerClass;
}
 
开发者ID:alessandroleite,项目名称:cloudsim-dsl,代码行数:17,代码来源:HostBuilder.java

示例2: create

import org.cloudbus.cloudsim.provisioners.PeProvisioner; //导入依赖的package包/类
public List<Pe> create(final double amount, final double mipsOfEachPe) {
    try {
        validateAmount(amount);
        final List<Pe> peList = new ArrayList<>();
        final Constructor cons =
                provisionerClass.getConstructor();
        for (int i = 0; i < amount; i++) {
            peList.add(new PeSimple(mipsOfEachPe, (PeProvisioner) cons.newInstance()));
        }
        return peList;
    } catch (NoSuchMethodException | SecurityException | InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException ex) {
        throw new RuntimeException("It wasn't possible to instantiate a list of Pe", ex);
    }
}
 
开发者ID:manoelcampos,项目名称:cloudsim-plus,代码行数:15,代码来源:PeBuilder.java

示例3: getMaxAvailableMips

import org.cloudbus.cloudsim.provisioners.PeProvisioner; //导入依赖的package包/类
@Override
public double getMaxAvailableMips() {
    return getWorkingPeList().stream()
            .map(Pe::getPeProvisioner)
            .mapToDouble(PeProvisioner::getAvailableResource)
            .max().orElse(0.0);
}
 
开发者ID:manoelcampos,项目名称:cloudsim-plus,代码行数:8,代码来源:VmSchedulerAbstract.java

示例4: setPeProvisioner

import org.cloudbus.cloudsim.provisioners.PeProvisioner; //导入依赖的package包/类
@Override
public final Pe setPeProvisioner(PeProvisioner peProvisioner) {
    Objects.requireNonNull(peProvisioner);
    this.peProvisioner = peProvisioner;
    this.peProvisioner.setPe(this);
    return this;
}
 
开发者ID:manoelcampos,项目名称:cloudsim-plus,代码行数:8,代码来源:PeSimple.java

示例5: getMaxUtilization

import org.cloudbus.cloudsim.provisioners.PeProvisioner; //导入依赖的package包/类
/**
 * Gets the max utilization percentage (between [0 and 1]) among all PEs.
 *
 * @param peList the pe list
 * @return the max utilization percentage (between [0 and 1])
 */
public static double getMaxUtilization(List<? extends Pe> peList) {
    return peList.stream()
        .map(Pe::getPeProvisioner)
        .mapToDouble(PeProvisioner::getUtilization)
        .max().orElse(0);
}
 
开发者ID:manoelcampos,项目名称:cloudsim-plus,代码行数:13,代码来源:PeList.java

示例6: getMaxUtilizationAmongVmsPes

import org.cloudbus.cloudsim.provisioners.PeProvisioner; //导入依赖的package包/类
/**
 * Gets the max utilization percentage among all PEs allocated to a VM.
 *
 * @param vm the vm to get the maximum utilization percentage
 * @param peList the pe list
 * @return the max utilization percentage
 */
public static double getMaxUtilizationAmongVmsPes(List<? extends Pe> peList, Vm vm) {
    return peList.stream()
        .map(Pe::getPeProvisioner)
        .filter(pv -> pv.getAllocatedResourceForVm(vm) > 0)
        .mapToDouble(PeProvisioner::getUtilization)
        .max().orElse(0);
}
 
开发者ID:manoelcampos,项目名称:cloudsim-plus,代码行数:15,代码来源:PeList.java

示例7: provisioner

import org.cloudbus.cloudsim.provisioners.PeProvisioner; //导入依赖的package包/类
@Override
public WithRam provisioner(Class<? extends PeProvisioner> cpuProvisionerType)
{
    cpuProvisionerClass_ = cpuProvisionerType;
    return new WithRam()
    {
        @Override
        public RamBuilder with(int ram)
        {
            ramSize_ = ram;
            return new RamBuilderImpl();
        }
    };
}
 
开发者ID:alessandroleite,项目名称:cloudsim-dsl,代码行数:15,代码来源:HostBuilder.java

示例8: getProvisionerClass

import org.cloudbus.cloudsim.provisioners.PeProvisioner; //导入依赖的package包/类
public Class<? extends PeProvisioner> getProvisionerClass() {
    return provisionerClass;
}
 
开发者ID:manoelcampos,项目名称:cloudsim-plus,代码行数:4,代码来源:PeBuilder.java

示例9: setProvisioner

import org.cloudbus.cloudsim.provisioners.PeProvisioner; //导入依赖的package包/类
public PeBuilder setProvisioner(Class<? extends PeProvisioner> defaultProvisioner) {
    this.provisionerClass = defaultProvisioner;
    return this;
}
 
开发者ID:manoelcampos,项目名称:cloudsim-plus,代码行数:5,代码来源:PeBuilder.java

示例10: getPeProvisioner

import org.cloudbus.cloudsim.provisioners.PeProvisioner; //导入依赖的package包/类
@Override public PeProvisioner getPeProvisioner() {
    return new PeProvisionerSimple();
}
 
开发者ID:manoelcampos,项目名称:cloudsim-plus,代码行数:4,代码来源:PeNull.java

示例11: setPeProvisioner

import org.cloudbus.cloudsim.provisioners.PeProvisioner; //导入依赖的package包/类
@Override public Pe setPeProvisioner(PeProvisioner peProvisioner) {
    return Pe.NULL;
}
 
开发者ID:manoelcampos,项目名称:cloudsim-plus,代码行数:4,代码来源:PeNull.java

示例12: createPe

import org.cloudbus.cloudsim.provisioners.PeProvisioner; //导入依赖的package包/类
private PeSimple createPe(PeProvisioner peProvisioner) {
    return new PeSimple(0, peProvisioner);
}
 
开发者ID:manoelcampos,项目名称:cloudsim-plus,代码行数:4,代码来源:PeTest.java

示例13: newPeProvisioner

import org.cloudbus.cloudsim.provisioners.PeProvisioner; //导入依赖的package包/类
public static PeProvisioner newPeProvisioner(final HostRegistry hr) throws RuntimeException {
    return resourceProvisioner("Pe", hr.getPeProvisioner());
}
 
开发者ID:manoelcampos,项目名称:cloudsim-plus-automation,代码行数:4,代码来源:PolicyLoader.java

示例14: Pe

import org.cloudbus.cloudsim.provisioners.PeProvisioner; //导入依赖的package包/类
/**
 * Allocates a new Pe object.
 * 
 * @param id the Pe ID
 * @param peProvisioner the pe provisioner
 * @pre id >= 0
 * @pre peProvisioner != null
 * @post $none
 */
public Pe(int id, PeProvisioner peProvisioner) {
	setId(id);
	setPeProvisioner(peProvisioner);

	// when created it should be set to FREE, i.e. available for use.
	status = FREE;
}
 
开发者ID:gmartinezramirez,项目名称:Fog-Computing-Mobile-Architecture,代码行数:17,代码来源:Pe.java

示例15: Pe

import org.cloudbus.cloudsim.provisioners.PeProvisioner; //导入依赖的package包/类
/**
 * 一个新的PE
 * Allocates a new Pe object.
 * 
 * @param id the Pe ID
 * @param peProvisioner the pe provisioner
 * @pre id >= 0
 * @pre peProvisioner != null
 * @post $none
 */
public Pe(int id, PeProvisioner peProvisioner) {
	setId(id);
	setPeProvisioner(peProvisioner);

	// when created it should be set to FREE, i.e. available for use.
	status = FREE;
}
 
开发者ID:demiaowu,项目名称:annotation-of-cloudsim3.0.3,代码行数:18,代码来源:Pe.java


注:本文中的org.cloudbus.cloudsim.provisioners.PeProvisioner类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。