• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java PeProvisioner类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: PeSimple

import org.cloudbus.cloudsim.provisioners.PeProvisioner; //导入依赖的package包/类
/**
 * Instantiates a new PE object.
 * The id of the PE is just set when a List of PEs is assigned to a Host.
 *
 * @param mipsCapacity the capacity of the PE in MIPS (Million Instructions per Second)
 * @param peProvisioner the provisioner that will manage the allocation of this physical Pe for VMs
 * @pre peProvisioner != null
 * @post $none
 */
public PeSimple(double mipsCapacity, PeProvisioner peProvisioner) {
    super((long)mipsCapacity);
    setId(-1);
    setPeProvisioner(peProvisioner);

    // when created it should be set to FREE, i.e. available for use.
    setStatus(Status.FREE);
}
 
开发者ID:manoelcampos,项目名称:cloudsim-plus,代码行数:18,代码来源:PeSimple.java


示例17: setPeProvisioner

import org.cloudbus.cloudsim.provisioners.PeProvisioner; //导入依赖的package包/类
/**
 * Sets the pe provisioner.
 * 
 * @param peProvisioner the new pe provisioner
 */
protected void setPeProvisioner(PeProvisioner peProvisioner) {
	this.peProvisioner = peProvisioner;
}
 
开发者ID:gmartinezramirez,项目名称:Fog-Computing-Mobile-Architecture,代码行数:9,代码来源:Pe.java


示例18: getPeProvisioner

import org.cloudbus.cloudsim.provisioners.PeProvisioner; //导入依赖的package包/类
/**
 * Gets the Pe provisioner.
 * 
 * @return the Pe provisioner
 */
public PeProvisioner getPeProvisioner() {
	return peProvisioner;
}
 
开发者ID:gmartinezramirez,项目名称:Fog-Computing-Mobile-Architecture,代码行数:9,代码来源:Pe.java


示例19: setPeProvisioner

import org.cloudbus.cloudsim.provisioners.PeProvisioner; //导入依赖的package包/类
/**
 * Sets the {@link #getPeProvisioner()} that manages the allocation
 * of this physical PE to virtual machines.
 * This method is automatically called when a {@link PeProvisioner} is created
 * passing a Pe instance. Thus, the PeProvisioner for a Pe doesn't have to be
 * set manually.
 *
 * @param peProvisioner the new PE provisioner
 * @return 
 */
Pe setPeProvisioner(PeProvisioner peProvisioner);
 
开发者ID:manoelcampos,项目名称:cloudsim-plus,代码行数:12,代码来源:Pe.java


示例20: getPeProvisioner

import org.cloudbus.cloudsim.provisioners.PeProvisioner; //导入依赖的package包/类
/**
 * Gets the PE provisioner that manages the allocation
 * of this physical PE to virtual machines.
 *
 * @return the PE provisioner
 */
PeProvisioner getPeProvisioner();
 
开发者ID:manoelcampos,项目名称:cloudsim-plus,代码行数:8,代码来源:Pe.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java DefaultParameterHandler类代码示例发布时间:2022-05-21
下一篇:
Java MediaStyle类代码示例发布时间:2022-05-21
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap