public class PeList
extends java.lang.Object
| Constructor and Description |
|---|
PeList() |
| Modifier and Type | Method and Description |
|---|---|
static <T extends Pe> |
getById(java.util.List<T> peList,
int id)
Gets MIPS Rating for a specified Pe ID.
|
static <T extends Pe> |
getFreePe(java.util.List<T> peList)
Gets a Pe ID which is FREE.
|
static <T extends Pe> |
getMaxUtilization(java.util.List<T> peList)
Gets the max utilization among by all PEs.
|
static <T extends Pe> |
getMaxUtilizationAmongVmsPes(java.util.List<T> peList,
Vm vm)
Gets the max utilization among by all PEs allocated to the VM.
|
static <T extends Pe> |
getMips(java.util.List<T> peList,
int id)
Gets MIPS Rating for a specified Pe ID.
|
static <T extends Pe> |
getNumberOfBusyPes(java.util.List<T> peList)
Gets the number of BUSY Pe.
|
static <T extends Pe> |
getNumberOfFreePes(java.util.List<T> peList)
Gets the number of FREE or non-busy Pe.
|
static <T extends Pe> |
getTotalMips(java.util.List<T> peList)
Gets total MIPS Rating for all PEs.
|
static <T extends Pe> |
setPeStatus(java.util.List<T> peList,
int id,
int status)
Sets the Pe status.
|
static <T extends Pe> |
setStatusFailed(java.util.List<T> peList,
boolean failed)
Sets the status of PEs of this machine to FAILED.
|
static <T extends Pe> |
setStatusFailed(java.util.List<T> peList,
java.lang.String resName,
int hostId,
boolean failed)
Sets the status of PEs of this machine to FAILED.
|
public static <T extends Pe> Pe getById(java.util.List<T> peList, int id)
id - the Pe IDpeList - the pe listpublic static <T extends Pe> int getMips(java.util.List<T> peList, int id)
id - the Pe IDpeList - the pe listpublic static <T extends Pe> int getTotalMips(java.util.List<T> peList)
peList - the pe listpublic static <T extends Pe> double getMaxUtilization(java.util.List<T> peList)
peList - the pe listpublic static <T extends Pe> double getMaxUtilizationAmongVmsPes(java.util.List<T> peList, Vm vm)
vm - the vmpeList - the pe listpublic static <T extends Pe> Pe getFreePe(java.util.List<T> peList)
peList - the pe listpublic static <T extends Pe> int getNumberOfFreePes(java.util.List<T> peList)
peList - the pe listpublic static <T extends Pe> boolean setPeStatus(java.util.List<T> 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(java.util.List<T> peList)
peList - the pe listpublic static <T extends Pe> void setStatusFailed(java.util.List<T> peList, java.lang.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" parameterpublic static <T extends Pe> void setStatusFailed(java.util.List<T> peList, boolean failed)
failed - the new value for the "failed" parameterpeList - the pe list