/** 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