NetworkDatacenterBrokerExtends (cloudsim 3.1-SNAPSHOT API)

org.cloudbus.cloudsim.network.datacenter

## Class NetworkDatacenterBrokerExtends

- java.lang.Object
- - org.cloudbus.cloudsim.core.SimEntity
  - - org.cloudbus.cloudsim.DatacenterBroker
    - - org.cloudbus.cloudsim.network.datacenter.NetworkDatacenterBrokerExtends

- All Implemented Interfaces:
    Cloneable

      public class NetworkDatacenterBrokerExtends
      extends DatacenterBroker

  NetDatacentreBroker represents a broker acting on behalf of Datacenter provider. It hides VM management, as vm creation, submission of cloudlets to this VMs and destruction of VMs. NOTE- It is an example only. It work on behalf of a provider not for users. One has to implement interaction with user broker to this broker.
  Since:
    CloudSim Toolkit 3.0
  Author:
    Saurabh Kumar Garg

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `cachedcloudlet`
    `boolean` | `createvmflag`
    `static Datacenter` | `linkDC`

    - ### Fields inherited from class org.cloudbus.cloudsim.DatacenterBroker

      `Postevt`

    - ### Fields inherited from class org.cloudbus.cloudsim.core.SimEntity

      `FINISHED, HOLDING, RUNNABLE, WAITING`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `NetworkDatacenterBrokerExtends(String name)` Created a new DatacenterBroker object.

  - ### Method Summary

    Methods
    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> List<T>` | `getAppCloudletList()` Sets the cloudlet list.
    `<T extends Cloudlet> List<T>` | `getCloudletReceivedList()` Gets the cloudlet received list.
    `<T extends Cloudlet> List<T>` | `getCloudletSubmittedList()` Gets the cloudlet submitted list.
    `protected Map<Integer,DatacenterCharacteristics>` | `getDatacenterCharacteristicsList()` Gets the datacenter characteristics list.
    `protected List<Integer>` | `getDatacenterIdsList()` Gets the datacenter ids list.
    `protected List<Integer>` | `getDatacenterRequestedIdsList()` Gets the datacenter requested ids list.
    `<T extends Vm> List<T>` | `getVmList()` Gets the vm list.
    `protected int` | `getVmsAcks()` Gets the vms acks.
    `<T extends Vm> List<T>` | `getVmsCreatedList()` Gets the vm list.
    `protected int` | `getVmsDestroyed()` Gets the vms destroyed.
    `protected int` | `getVmsRequested()` Gets the vms requested.
    `protected Map<Integer,Integer>` | `getVmsToDatacentersMap()` Gets the vms to datacenters map.
    `protected void` | `incrementVmsAcks()` Increment vms acks.
    `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` | `processResourceCharacteristicsRequest(SimEvent ev)` Process a request for the characteristics of a PowerDatacenter.
    `protected void` | `processVmCreate(SimEvent ev)` Process the ack received due to a request for VM creation.
    `<T extends AppCloudlet> void` | `setAppCloudletList(List<T> appCloudletList)`
    `protected <T extends Cloudlet> void` | `setCloudletReceivedList(List<T> cloudletReceivedList)` Sets the cloudlet received list.
    `protected <T extends Cloudlet> void` | `setCloudletSubmittedList(List<T> cloudletSubmittedList)` Sets the cloudlet submitted list.
    `protected void` | `setDatacenterCharacteristicsList(Map<Integer,DatacenterCharacteristics> datacenterCharacteristicsList)` Sets the datacenter characteristics list.
    `protected void` | `setDatacenterIdsList(List<Integer> datacenterIdsList)` Sets the datacenter ids list.
    `protected void` | `setDatacenterRequestedIdsList(List<Integer> datacenterRequestedIdsList)` Sets the datacenter requested ids list.
    `void` | `setLinkDC(Datacenter alinkDC)` This method is used to send to the broker the list of cloudlets.
    `protected <T extends Vm> void` | `setVmList(List<T> vmList)` Sets the vm list.
    `protected void` | `setVmsAcks(int vmsAcks)` Sets the vms acks.
    `protected <T extends Vm> void` | `setVmsCreatedList(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(Map<Integer,Integer> vmsToDatacentersMap)` Sets the vms to datacenters map.
    `void` | `shutdownEntity()` Send an internal event communicating the end of the simulation.
    `void` | `startEntity()` This method is invoked by the `Simulation` class when the simulation is started.

    - ### Methods inherited from class org.cloudbus.cloudsim.DatacenterBroker

      `bindCloudletToVm, createVmsInDatacenter, finishExecution, getCloudletList, getPostevt, processCloudletReturn, processPostEvent, processResourceCharacteristics, setCloudletList, setPostevt, submitCloudletList, submitCloudlets, submitVmList`

    - ### Methods inherited from class org.cloudbus.cloudsim.core.SimEntity

      `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, waitForEvent`

    - ### Methods inherited from class java.lang.Object

      `equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### linkDC

          public static Datacenter linkDC

    - #### createvmflag

          public boolean createvmflag

    - #### cachedcloudlet

          public static int cachedcloudlet

  - ### Constructor Detail

    - #### NetworkDatacenterBrokerExtends

          public NetworkDatacenterBrokerExtends(String name)
                                         throws Exception

      Created a new DatacenterBroker object.
      Parameters:
        `name` - name to be associated with this entity (as required by Sim_entity class from simjava package)
      Throws:
        `Exception` - the exception

  - ### Method Detail

    - #### processVmCreate

          protected void processVmCreate(SimEvent ev)

      Description copied from class: `DatacenterBroker`
      Process the ack received due to a request for VM creation.
      Overrides:
        `processVmCreate` in class `DatacenterBroker`
      Parameters:
        `ev` - a SimEvent object

    - #### setLinkDC

          public void setLinkDC(Datacenter alinkDC)

      This method is used to send to the broker the list of cloudlets.
      Parameters:
        `list` - the list

    - #### processEvent

          public void processEvent(SimEvent ev)

      Processes events available for this Broker.
      Overrides:
        `processEvent` in class `DatacenterBroker`
      Parameters:
        `ev` - a SimEvent object

    - #### processResourceCharacteristicsRequest

          protected void processResourceCharacteristicsRequest(SimEvent ev)

      Process a request for the characteristics of a PowerDatacenter.
      Overrides:
        `processResourceCharacteristicsRequest` in class `DatacenterBroker`
      Parameters:
        `ev` - a SimEvent object

    - #### processOtherEvent

          protected void processOtherEvent(SimEvent ev)

      Overrides this method when making a new and different type of Broker. This method is called by `#body()` for incoming unknown tags.
      Overrides:
        `processOtherEvent` in class `DatacenterBroker`
      Parameters:
        `ev` - a SimEvent object

    - #### createVmsInDatacenterBase

          protected void createVmsInDatacenterBase(int datacenterId)

      Create the virtual machines in a datacenter and submit/schedule cloudlets to them.
      Parameters:
        `datacenterId` - Id of the chosen PowerDatacenter

    - #### clearDatacenters

          protected void clearDatacenters()

      Submit cloudlets to the created VMs.
      Overrides:
        `clearDatacenters` in class `DatacenterBroker`

    - #### shutdownEntity

          public void shutdownEntity()

      Send an internal event communicating the end of the simulation.
      Overrides:
        `shutdownEntity` in class `DatacenterBroker`

    - #### startEntity

          public void startEntity()

      Description copied from class: `SimEntity`
      This method is invoked by the `Simulation` class when the simulation is started. This method should be responsible for starting the entity up.
      Overrides:
        `startEntity` in class `DatacenterBroker`

    - #### getVmList

          public <T extends Vm> List<T> getVmList()

      Gets the vm list.
      Overrides:
        `getVmList` in class `DatacenterBroker`
      Type Parameters:
        `T` - the generic type
      Returns:
        the vm list

    - #### setVmList

          protected <T extends Vm> void setVmList(List<T> vmList)

      Sets the vm list.
      Overrides:
        `setVmList` in class `DatacenterBroker`
      Type Parameters:
        `T` - the generic type
      Parameters:
        `vmList` - the new vm list

    - #### getAppCloudletList

          public <T extends AppCloudlet> List<T> getAppCloudletList()

      Sets the cloudlet list.
      Type Parameters:
        `T` - the generic type
      Parameters:
        `cloudletList` - the new cloudlet list

    - #### setAppCloudletList

          public <T extends AppCloudlet> void setAppCloudletList(List<T> appCloudletList)

    - #### getCloudletSubmittedList

          public <T extends Cloudlet> List<T> getCloudletSubmittedList()

      Gets the cloudlet submitted list.
      Overrides:
        `getCloudletSubmittedList` in class `DatacenterBroker`
      Type Parameters:
        `T` - the generic type
      Returns:
        the cloudlet submitted list

    - #### setCloudletSubmittedList

          protected <T extends Cloudlet> void setCloudletSubmittedList(List<T> cloudletSubmittedList)

      Sets the cloudlet submitted list.
      Overrides:
        `setCloudletSubmittedList` in class `DatacenterBroker`
      Type Parameters:
        `T` - the generic type
      Parameters:
        `cloudletSubmittedList` - the new cloudlet submitted list

    - #### getCloudletReceivedList

          public <T extends Cloudlet> List<T> getCloudletReceivedList()

      Gets the cloudlet received list.
      Overrides:
        `getCloudletReceivedList` in class `DatacenterBroker`
      Type Parameters:
        `T` - the generic type
      Returns:
        the cloudlet received list

    - #### setCloudletReceivedList

          protected <T extends Cloudlet> void setCloudletReceivedList(List<T> cloudletReceivedList)

      Sets the cloudlet received list.
      Overrides:
        `setCloudletReceivedList` in class `DatacenterBroker`
      Type Parameters:
        `T` - the generic type
      Parameters:
        `cloudletReceivedList` - the new cloudlet received list

    - #### getVmsCreatedList

          public <T extends Vm> List<T> getVmsCreatedList()

      Gets the vm list.
      Overrides:
        `getVmsCreatedList` in class `DatacenterBroker`
      Type Parameters:
        `T` - the generic type
      Returns:
        the vm list

    - #### setVmsCreatedList

          protected <T extends Vm> void setVmsCreatedList(List<T> vmsCreatedList)

      Sets the vm list.
      Overrides:
        `setVmsCreatedList` in class `DatacenterBroker`
      Type Parameters:
        `T` - the generic type
      Parameters:
        `vmsCreatedList` - the vms created list

    - #### getVmsRequested

          protected int getVmsRequested()

      Gets the vms requested.
      Overrides:
        `getVmsRequested` in class `DatacenterBroker`
      Returns:
        the vms requested

    - #### setVmsRequested

          protected void setVmsRequested(int vmsRequested)

      Sets the vms requested.
      Overrides:
        `setVmsRequested` in class `DatacenterBroker`
      Parameters:
        `vmsRequested` - the new vms requested

    - #### getVmsAcks

          protected int getVmsAcks()

      Gets the vms acks.
      Overrides:
        `getVmsAcks` in class `DatacenterBroker`
      Returns:
        the vms acks

    - #### setVmsAcks

          protected void setVmsAcks(int vmsAcks)

      Sets the vms acks.
      Overrides:
        `setVmsAcks` in class `DatacenterBroker`
      Parameters:
        `vmsAcks` - the new vms acks

    - #### incrementVmsAcks

          protected void incrementVmsAcks()

      Increment vms acks.
      Overrides:
        `incrementVmsAcks` in class `DatacenterBroker`

    - #### getVmsDestroyed

          protected int getVmsDestroyed()

      Gets the vms destroyed.
      Overrides:
        `getVmsDestroyed` in class `DatacenterBroker`
      Returns:
        the vms destroyed

    - #### setVmsDestroyed

          protected void setVmsDestroyed(int vmsDestroyed)

      Sets the vms destroyed.
      Overrides:
        `setVmsDestroyed` in class `DatacenterBroker`
      Parameters:
        `vmsDestroyed` - the new vms destroyed

    - #### getDatacenterIdsList

          protected List<Integer> getDatacenterIdsList()

      Gets the datacenter ids list.
      Overrides:
        `getDatacenterIdsList` in class `DatacenterBroker`
      Returns:
        the datacenter ids list

    - #### setDatacenterIdsList

          protected void setDatacenterIdsList(List<Integer> datacenterIdsList)

      Sets the datacenter ids list.
      Overrides:
        `setDatacenterIdsList` in class `DatacenterBroker`
      Parameters:
        `datacenterIdsList` - the new datacenter ids list

    - #### getVmsToDatacentersMap

          protected Map<Integer,Integer> getVmsToDatacentersMap()

      Gets the vms to datacenters map.
      Overrides:
        `getVmsToDatacentersMap` in class `DatacenterBroker`
      Returns:
        the vms to datacenters map

    - #### setVmsToDatacentersMap

          protected void setVmsToDatacentersMap(Map<Integer,Integer> vmsToDatacentersMap)

      Sets the vms to datacenters map.
      Overrides:
        `setVmsToDatacentersMap` in class `DatacenterBroker`
      Parameters:
        `vmsToDatacentersMap` - the vms to datacenters map

    - #### getDatacenterCharacteristicsList

          protected Map<Integer,DatacenterCharacteristics> getDatacenterCharacteristicsList()

      Gets the datacenter characteristics list.
      Overrides:
        `getDatacenterCharacteristicsList` in class `DatacenterBroker`
      Returns:
        the datacenter characteristics list

    - #### setDatacenterCharacteristicsList

          protected void setDatacenterCharacteristicsList(Map<Integer,DatacenterCharacteristics> datacenterCharacteristicsList)

      Sets the datacenter characteristics list.
      Overrides:
        `setDatacenterCharacteristicsList` in class `DatacenterBroker`
      Parameters:
        `datacenterCharacteristicsList` - the datacenter characteristics list

    - #### getDatacenterRequestedIdsList

          protected List<Integer> getDatacenterRequestedIdsList()

      Gets the datacenter requested ids list.
      Overrides:
        `getDatacenterRequestedIdsList` in class `DatacenterBroker`
      Returns:
        the datacenter requested ids list

    - #### setDatacenterRequestedIdsList

          protected void setDatacenterRequestedIdsList(List<Integer> datacenterRequestedIdsList)

      Sets the datacenter requested ids list.
      Overrides:
        `setDatacenterRequestedIdsList` in class `DatacenterBroker`
      Parameters:
        `datacenterRequestedIdsList` - the new datacenter requested ids list

Copyright © 2013 The Cloud Computing and Distributed Systems (CLOUDS) Laboratory, The University of Melbourne. All Rights Reserved.