public class NetDatacenterBroker extends SimEntity
| Modifier and Type | Field and Description |
|---|---|
static int |
cachedcloudlet |
boolean |
createvmflag |
static NetworkDatacenter |
linkDC |
| Constructor and Description |
|---|
NetDatacenterBroker(java.lang.String name)
Created a new DatacenterBroker object.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
clearDatacenters()
Submit cloudlets to the created VMs.
|
protected void |
createVmsInDatacenterBase(int datacenterId)
Create the virtual machines in a datacenter and submit/schedule cloudlets to them.
|
<T extends AppCloudlet> |
getAppCloudletList() |
<T extends NetworkCloudlet> |
getCloudletList()
Gets the cloudlet list.
|
<T extends Cloudlet> |
getCloudletReceivedList()
Gets the cloudlet received list.
|
<T extends Cloudlet> |
getCloudletSubmittedList()
Gets the cloudlet submitted list.
|
protected java.util.Map<java.lang.Integer,DatacenterCharacteristics> |
getDatacenterCharacteristicsList()
Gets the datacenter characteristics list.
|
protected java.util.List<java.lang.Integer> |
getDatacenterIdsList()
Gets the datacenter ids list.
|
protected java.util.List<java.lang.Integer> |
getDatacenterRequestedIdsList()
Gets the datacenter requested ids list.
|
<T extends Vm> |
getVmList()
Gets the vm list.
|
protected int |
getVmsAcks()
Gets the vms acks.
|
<T extends Vm> |
getVmsCreatedList()
Gets the vm list.
|
protected int |
getVmsDestroyed()
Gets the vms destroyed.
|
protected int |
getVmsRequested()
Gets the vms requested.
|
protected java.util.Map<java.lang.Integer,java.lang.Integer> |
getVmsToDatacentersMap()
Gets the vms to datacenters map.
|
protected void |
incrementVmsAcks()
Increment vms acks.
|
protected void |
processCloudletReturn(SimEvent ev)
Process a cloudlet return event.
|
void |
processEvent(SimEvent ev)
Processes events available for this Broker.
|
protected void |
processOtherEvent(SimEvent ev)
Overrides this method when making a new and different type of Broker.
|
protected void |
processResourceCharacteristics(SimEvent ev)
Process the return of a request for the characteristics of a PowerDatacenter.
|
protected void |
processResourceCharacteristicsRequest(SimEvent ev)
Process a request for the characteristics of a PowerDatacenter.
|
<T extends AppCloudlet> |
setAppCloudletList(java.util.List<T> appCloudletList) |
protected <T extends NetworkCloudlet> |
setCloudletList(java.util.List<T> cloudletList)
Sets the cloudlet list.
|
protected <T extends Cloudlet> |
setCloudletReceivedList(java.util.List<T> cloudletReceivedList)
Sets the cloudlet received list.
|
protected <T extends Cloudlet> |
setCloudletSubmittedList(java.util.List<T> cloudletSubmittedList)
Sets the cloudlet submitted list.
|
protected void |
setDatacenterCharacteristicsList(java.util.Map<java.lang.Integer,DatacenterCharacteristics> datacenterCharacteristicsList)
Sets the datacenter characteristics list.
|
protected void |
setDatacenterIdsList(java.util.List<java.lang.Integer> datacenterIdsList)
Sets the datacenter ids list.
|
protected void |
setDatacenterRequestedIdsList(java.util.List<java.lang.Integer> datacenterRequestedIdsList)
Sets the datacenter requested ids list.
|
void |
setLinkDC(NetworkDatacenter alinkDC) |
protected <T extends Vm> |
setVmList(java.util.List<T> vmList)
Sets the vm list.
|
protected void |
setVmsAcks(int vmsAcks)
Sets the vms acks.
|
protected <T extends Vm> |
setVmsCreatedList(java.util.List<T> vmsCreatedList)
Sets the vm list.
|
protected void |
setVmsDestroyed(int vmsDestroyed)
Sets the vms destroyed.
|
protected void |
setVmsRequested(int vmsRequested)
Sets the vms requested.
|
protected void |
setVmsToDatacentersMap(java.util.Map<java.lang.Integer,java.lang.Integer> vmsToDatacentersMap)
Sets the vms to datacenters map.
|
void |
shutdownEntity()
This method is invoked by the
Simulation before the simulation finishes. |
void |
startEntity()
This method is invoked by the
Simulation class when the simulation is started. |
void |
submitCloudletList(java.util.List<? extends NetworkCloudlet> list)
This method is used to send to the broker the list of cloudlets.
|
void |
submitVmList(java.util.List<? extends Vm> list)
This method is used to send to the broker the list with virtual machines that must be
created.
|
cancelEvent, clone, getEventBuffer, getId, getName, getNextEvent, getNextEvent, getState, numEventsWaiting, numEventsWaiting, pause, run, schedule, schedule, schedule, schedule, scheduleFirst, scheduleFirst, scheduleFirst, scheduleFirst, scheduleFirstNow, scheduleFirstNow, scheduleFirstNow, scheduleFirstNow, scheduleNow, scheduleNow, scheduleNow, scheduleNow, selectEvent, send, send, send, send, sendNow, sendNow, sendNow, sendNow, setEventBuffer, setId, setState, waitForEventpublic static NetworkDatacenter linkDC
public boolean createvmflag
public static int cachedcloudlet
public NetDatacenterBroker(java.lang.String name)
throws java.lang.Exception
name - name to be associated with this entity (as required by Sim_entity class from
simjava package)java.lang.Exception - the exceptionpublic void submitVmList(java.util.List<? extends Vm> list)
list - the listpublic void submitCloudletList(java.util.List<? extends NetworkCloudlet> list)
list - the listpublic void setLinkDC(NetworkDatacenter alinkDC)
public void processEvent(SimEvent ev)
processEvent in class SimEntityev - a SimEvent objectprotected void processResourceCharacteristics(SimEvent ev)
ev - a SimEvent objectprotected void processResourceCharacteristicsRequest(SimEvent ev)
ev - a SimEvent objectprotected void processCloudletReturn(SimEvent ev)
ev - a SimEvent objectprotected void processOtherEvent(SimEvent ev)
#body() for incoming unknown tags.ev - a SimEvent objectprotected void createVmsInDatacenterBase(int datacenterId)
datacenterId - Id of the chosen PowerDatacenterprotected void clearDatacenters()
public void shutdownEntity()
SimEntitySimulation before the simulation finishes. If you want
to save data in log files this is the method in which the corresponding code would be placed.shutdownEntity in class SimEntitypublic void startEntity()
SimEntitySimulation class when the simulation is started. This
method should be responsible for starting the entity up.startEntity in class SimEntitypublic <T extends Vm> java.util.List<T> getVmList()
T - the generic typeprotected <T extends Vm> void setVmList(java.util.List<T> vmList)
T - the generic typevmList - the new vm listpublic <T extends NetworkCloudlet> java.util.List<T> getCloudletList()
T - the generic typeprotected <T extends NetworkCloudlet> void setCloudletList(java.util.List<T> cloudletList)
T - the generic typecloudletList - the new cloudlet listpublic <T extends AppCloudlet> java.util.List<T> getAppCloudletList()
public <T extends AppCloudlet> void setAppCloudletList(java.util.List<T> appCloudletList)
public <T extends Cloudlet> java.util.List<T> getCloudletSubmittedList()
T - the generic typeprotected <T extends Cloudlet> void setCloudletSubmittedList(java.util.List<T> cloudletSubmittedList)
T - the generic typecloudletSubmittedList - the new cloudlet submitted listpublic <T extends Cloudlet> java.util.List<T> getCloudletReceivedList()
T - the generic typeprotected <T extends Cloudlet> void setCloudletReceivedList(java.util.List<T> cloudletReceivedList)
T - the generic typecloudletReceivedList - the new cloudlet received listpublic <T extends Vm> java.util.List<T> getVmsCreatedList()
T - the generic typeprotected <T extends Vm> void setVmsCreatedList(java.util.List<T> vmsCreatedList)
T - the generic typevmsCreatedList - the vms created listprotected int getVmsRequested()
protected void setVmsRequested(int vmsRequested)
vmsRequested - the new vms requestedprotected int getVmsAcks()
protected void setVmsAcks(int vmsAcks)
vmsAcks - the new vms acksprotected void incrementVmsAcks()
protected int getVmsDestroyed()
protected void setVmsDestroyed(int vmsDestroyed)
vmsDestroyed - the new vms destroyedprotected java.util.List<java.lang.Integer> getDatacenterIdsList()
protected void setDatacenterIdsList(java.util.List<java.lang.Integer> datacenterIdsList)
datacenterIdsList - the new datacenter ids listprotected java.util.Map<java.lang.Integer,java.lang.Integer> getVmsToDatacentersMap()
protected void setVmsToDatacentersMap(java.util.Map<java.lang.Integer,java.lang.Integer> vmsToDatacentersMap)
vmsToDatacentersMap - the vms to datacenters mapprotected java.util.Map<java.lang.Integer,DatacenterCharacteristics> getDatacenterCharacteristicsList()
protected void setDatacenterCharacteristicsList(java.util.Map<java.lang.Integer,DatacenterCharacteristics> datacenterCharacteristicsList)
datacenterCharacteristicsList - the datacenter characteristics listprotected java.util.List<java.lang.Integer> getDatacenterRequestedIdsList()
protected void setDatacenterRequestedIdsList(java.util.List<java.lang.Integer> datacenterRequestedIdsList)
datacenterRequestedIdsList - the new datacenter requested ids list