Vmallocationpolicy. Java

Source: Internet
Author: User
/** Title: cloudsim toolkit * Description: cloudsim (cloud simulation) Toolkit for modeling and simulation of clouds * Licence: GPL-http://www.gnu.org/copyleft/gpl.html ** copyright (c) 2009-2010, the University of Melbourne, Australia */package Org. cloudid. cloudsim; import Java. util. list; import Java. util. map;/*** host allocation policy. For a VM, select a host to run * vmallocationpolicy is an abstract class that Repr Esents the provisioning * policy of hosts to virtual machines in a datacentre. it supports two-stage * commit of reservation of hosts: First, we reserve the host and, once * commited by the user, it is still tivelly allocated to he/she ** @ authorrodrigo n. calheiros * @ authoranton beloglazov * @ sincecloudsim toolkit 1.0 */public abstract class vmallocationpolicy {/** the host list. */private list <? Extends host> hostlist;/*** allocates a new vmallocationpolicy object. ** @ Param list machines available in this datacentre ** @ pre $ none * @ post $ none */Public vmallocationpolicy (list <? Extends host> List) {sethostlist (list);}/*** allocates a host for a given VM. the host to be allocated is the one * that was already reserved. ** @ Param VM Virtual Machine which the host is reserved to ** @ return $ true if the host cocould be allocated; $ false otherwise ** @ pre $ none * @ post $ none */Public Abstract Boolean allocatehostforvm (Vm VM);/*** allocates a specified host for a given VM. ** @ Param VM Virtual Machine which the host is reserved to ** @ return $ true if the host cocould be allocated; $ false otherwise ** @ pre $ none * @ post $ none */Public Abstract Boolean allocatehostforvm (Vm, host ); /*** optimize allocation of the VMS according to current utilization. ** @ Param vmlist the VM list * @ Param utilizationbound the utilization bound * @ Param time the time ** @ retur N the array list 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.