Package org.cloudbus.cloudsim.core
Class CustomerEntityAbstract
java.lang.Object
org.cloudbus.cloudsim.core.CustomerEntityAbstract
- All Implemented Interfaces:
ChangeableId
,CustomerEntity
,Delayable
,Identifiable
,UniquelyIdentifiable
- Direct Known Subclasses:
CloudletAbstract
,VmSimple
public abstract class CustomerEntityAbstract extends java.lang.Object implements CustomerEntity
A base class for
CustomerEntity
implementations.- Since:
- CloudSim Plus 4.0.3
- Author:
- Manoel Campos da Silva Filho
-
Constructor Summary
Constructors Modifier Constructor Description protected
CustomerEntityAbstract()
-
Method Summary
Modifier and Type Method Description DatacenterBroker
getBroker()
Gets theDatacenterBroker
that represents the owner of this object.long
getId()
Datacenter
getLastTriedDatacenter()
Gets the last Datacenter where VM was tried to be created.Simulation
getSimulation()
Gets the CloudSim instance that represents the simulation the Entity is related to.java.lang.String
getUid()
Gets the Unique Identifier (UID) for the VM, that is compounded by the id of aDatacenterBroker
(representing the User) and the object id.int
hashCode()
void
setBroker(DatacenterBroker broker)
Sets aDatacenterBroker
that represents the owner of this object.void
setId(long id)
void
setLastTriedDatacenter(Datacenter lastTriedDatacenter)
Sets the last Datacenter where VM was tried to be created.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.cloudbus.cloudsim.core.Delayable
getSubmissionDelay, setSubmissionDelay
-
Constructor Details
-
CustomerEntityAbstract
protected CustomerEntityAbstract()
-
-
Method Details
-
setBroker
Description copied from interface:CustomerEntity
Sets aDatacenterBroker
that represents the owner of this object.- Specified by:
setBroker
in interfaceCustomerEntity
- Parameters:
broker
- theDatacenterBroker
to set
-
getBroker
Description copied from interface:CustomerEntity
Gets theDatacenterBroker
that represents the owner of this object.- Specified by:
getBroker
in interfaceCustomerEntity
- Returns:
- the broker or
DatacenterBroker.NULL
if a broker has not been set yet
-
getId
public long getId()- Specified by:
getId
in interfaceIdentifiable
-
setId
public final void setId(long id)- Specified by:
setId
in interfaceChangeableId
-
getUid
public java.lang.String getUid()Description copied from interface:UniquelyIdentifiable
Gets the Unique Identifier (UID) for the VM, that is compounded by the id of aDatacenterBroker
(representing the User) and the object id.- Specified by:
getUid
in interfaceUniquelyIdentifiable
- Returns:
-
getSimulation
Description copied from interface:CustomerEntity
Gets the CloudSim instance that represents the simulation the Entity is related to.- Specified by:
getSimulation
in interfaceCustomerEntity
- Returns:
-
hashCode
public int hashCode()- Overrides:
hashCode
in classjava.lang.Object
-
setLastTriedDatacenter
Description copied from interface:CustomerEntity
Sets the last Datacenter where VM was tried to be created.- Specified by:
setLastTriedDatacenter
in interfaceCustomerEntity
-
getLastTriedDatacenter
Description copied from interface:CustomerEntity
Gets the last Datacenter where VM was tried to be created.- Specified by:
getLastTriedDatacenter
in interfaceCustomerEntity
-