public class PeList extends Object
| Constructor and Description |
|---|
PeList() |
| Modifier and Type | Method and Description |
|---|---|
static <T extends Pe> |
getById(List<Pe> peList,
int id)
Gets MIPS Rating for a specified Pe ID.
|
static <T extends Pe> |
getFreePe(List<Pe> peList)
Gets a Pe ID which is FREE.
|
static <T extends Pe> |
getMaxUtilization(List<Pe> peList)
Gets the max utilization among by all PEs.
|
static <T extends Pe> |
getMaxUtilizationAmongVmsPes(List<Pe> peList,
Vm vm)
Gets the max utilization among by all PEs allocated to the VM.
|
static <T extends Pe> |
getMips(List<Pe> peList,
int id)
Gets MIPS Rating for a specified Pe ID.
|
static <T extends Pe> |
getNumberOfBusyPes(List<Pe> peList)
Gets the number of BUSY Pe.
|
static <T extends Pe> |
getNumberOfFreePes(List<Pe> peList)
Gets the number of FREE or non-busy Pe.
|
static <T extends Pe> |
getTotalMips(List<Pe> peList)
Gets total MIPS Rating for all PEs.
|
static <T extends Pe> |
setPeStatus(List<Pe> peList,
int id,
int status)
Sets the Pe status.
|
static <T extends Pe> |
setStatusFailed(List<Pe> peList,
boolean failed)
Sets the status of PEs of this machine to FAILED.
|
static <T extends Pe> |
setStatusFailed(List<Pe> peList,
String resName,
int hostId,
boolean failed)
Sets the status of PEs of this machine to FAILED.
|
public static <T extends Pe> Pe getById(List<Pe> peList, int id)
id - the Pe IDpeList - the pe listpublic static <T extends Pe> int getMips(List<Pe> peList, int id)
id - the Pe IDpeList - the pe listpublic static <T extends Pe> int getTotalMips(List<Pe> peList)
peList - the pe listpublic static <T extends Pe> double getMaxUtilization(List<Pe> peList)
peList - the pe listpublic static <T extends Pe> double getMaxUtilizationAmongVmsPes(List<Pe> peList, Vm vm)
vm - the vmpeList - the pe listpublic static <T extends Pe> Pe getFreePe(List<Pe> peList)
peList - the pe listpublic static <T extends Pe> int getNumberOfFreePes(List<Pe> peList)
peList - the pe listpublic static <T extends Pe> boolean setPeStatus(List<Pe> peList, int id, int status)
status - Pe status, either Pe.FREE or Pe.BUSYid - the idpeList - the pe listpublic static <T extends Pe> int getNumberOfBusyPes(List<Pe> peList)
peList - the pe listpublic static <T extends Pe> void setStatusFailed(List<Pe> peList, String resName, int hostId, boolean failed)
#setStatusFailed(boolean) if you do not want this information.resName - the name of the resourcehostId - the id of this machinefailed - the new value for the "failed" parameterCopyright © 2012 The Cloud Computing and Distributed Systems (CLOUDS) Laboratory, The University of Melbourne. All Rights Reserved.