public class Pe
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
BUSY
Denotes Pe is allocated and hence busy in processing Cloudlet.
|
static int |
FAILED
Denotes Pe is failed and hence it can't process any Cloudlet at this moment.
|
static int |
FREE
Denotes Pe is FREE for allocation.
|
| Constructor and Description |
|---|
Pe(int id,
PeProvisioner peProvisioner)
Allocates a new Pe object.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getId()
Gets the id.
|
int |
getMips()
Gets the MIPS Rating of this Pe.
|
PeProvisioner |
getPeProvisioner()
Gets the Pe provisioner.
|
int |
getStatus()
Gets the status of this Pe.
|
protected void |
setId(int id)
Sets the id.
|
void |
setMips(double d)
Sets the MIPS Rating of this Pe.
|
protected void |
setPeProvisioner(PeProvisioner peProvisioner)
Sets the pe provisioner.
|
void |
setStatus(int status)
Sets Pe status to either Pe.FREE or Pe.BUSY
|
void |
setStatusBusy()
Sets Pe status to busy, meaning it is already executing Cloudlets.
|
void |
setStatusFailed()
Sets this Pe to FAILED.
|
void |
setStatusFree()
Sets Pe status to free, meaning it is available for processing.
|
public static final int FREE
public static final int BUSY
public static final int FAILED
public Pe(int id, PeProvisioner peProvisioner)
id - the Pe IDpeProvisioner - the pe provisionerprotected void setId(int id)
id - the new idpublic int getId()
public void setMips(double d)
d - the mipspublic int getMips()
public int getStatus()
public void setStatusFree()
public void setStatusBusy()
public void setStatusFailed()
public void setStatus(int status)
status - Pe status, true if it is FREE, false if BUSY.protected void setPeProvisioner(PeProvisioner peProvisioner)
peProvisioner - the new pe provisionerpublic PeProvisioner getPeProvisioner()