public class HostList
extends java.lang.Object
| Constructor and Description |
|---|
HostList() |
| Modifier and Type | Method and Description |
|---|---|
static <T extends Host> |
getById(java.util.List<T> hostList,
int id)
Gets the Machine object for a particular ID.
|
static <T extends Host> |
getHostWithFreePe(java.util.List<T> hostList)
Gets a Machine with free Pe.
|
static <T extends Host> |
getHostWithFreePe(java.util.List<T> hostList,
int pesNumber)
Gets a Machine with a specified number of free Pe.
|
static <T extends Host> |
getNumberOfBusyPes(java.util.List<T> hostList)
Gets the total number of BUSY PEs for all Machines.
|
static <T extends Host> |
getNumberOfFreePes(java.util.List<T> hostList)
Gets the total number of FREE or non-busy PEs for all Machines.
|
static <T extends Host> |
getNumberOfPes(java.util.List<T> hostList)
Gets the total number of PEs for all Machines.
|
static <T extends Host> |
setPeStatus(java.util.List<T> hostList,
int status,
int hostId,
int peId)
Sets the particular Pe status on a Machine.
|
public static <T extends Host> T getById(java.util.List<T> hostList, int id)
T - the generic typehostList - the host listid - the host IDgridsim.Machinepublic static <T extends Host> int getNumberOfPes(java.util.List<T> hostList)
T - the generic typehostList - the host listpublic static <T extends Host> int getNumberOfFreePes(java.util.List<T> hostList)
T - the generic typehostList - the host listpublic static <T extends Host> int getNumberOfBusyPes(java.util.List<T> hostList)
T - the generic typehostList - the host listpublic static <T extends Host> T getHostWithFreePe(java.util.List<T> hostList)
T - the generic typehostList - the host listpublic static <T extends Host> T getHostWithFreePe(java.util.List<T> hostList, int pesNumber)
T - the generic typehostList - the host listpesNumber - the pes numberpublic static <T extends Host> boolean setPeStatus(java.util.List<T> hostList, int status, int hostId, int peId)
T - the generic typehostList - the host liststatus - Pe status, either Pe.FREE or Pe.BUSYhostId - the host idpeId - the pe id