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
A base class for
CustomerEntity
implementations.- Since:
- CloudSim Plus 4.0.3
- Author:
- Manoel Campos da Silva Filho
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
double
Gets the absolute time the entity arrived at the broker, before being submitted to a Datacenter.Gets theDatacenterBroker
that represents the owner of this object.double
Gets the absolute time the entity was created into a Datacenter.long
getId()
Gets the last Datacenter where entity was tried to be created.Gets the CloudSim instance that represents the simulation the Entity is related to.getUid()
Gets the Unique Identifier (UID) for the entity, that is compounded by the id of aDatacenterBroker
and the object id.double
Gets the total time the entity had to wait before being created, either due to a givensubmission delay
or because there was no suitable Host available after the VM submission.final int
hashCode()
setArrivedTime
(double time) Sets the absolute time the entity arrived at the broker, before being submitted to a Datacenter.final void
setBroker
(DatacenterBroker broker) Sets aDatacenterBroker
that represents the owner of this object.setCreationTime
(double time) final void
setId
(long id) Sets the id of the object.void
setLastTriedDatacenter
(Datacenter lastTriedDatacenter) Sets the last Datacenter where entity was tried to be created.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.cloudbus.cloudsim.core.Delayable
getSubmissionDelay, isDelayed, 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) Description copied from interface:ChangeableId
Sets the id of the object. -1 indicates the object has no id.- Specified by:
setId
in interfaceChangeableId
- Parameters:
id
- the id to set
-
getUid
Description copied from interface:UniquelyIdentifiable
Gets the Unique Identifier (UID) for the entity, that is compounded by the id of aDatacenterBroker
and the object id.- Specified by:
getUid
in interfaceUniquelyIdentifiable
- Returns:
-
getArrivedTime
public double getArrivedTime()Description copied from interface:CustomerEntity
Gets the absolute time the entity arrived at the broker, before being submitted to a Datacenter.- Specified by:
getArrivedTime
in interfaceCustomerEntity
- Returns:
- the arrived time (in seconds)
- See Also:
-
setArrivedTime
Description copied from interface:CustomerEntity
Sets the absolute time the entity arrived at the broker, before being submitted to a Datacenter.- Specified by:
setArrivedTime
in interfaceCustomerEntity
- Parameters:
time
- the time to set
-
getCreationTime
public double getCreationTime()Description copied from interface:CustomerEntity
Gets the absolute time the entity was created into a Datacenter.- Specified by:
getCreationTime
in interfaceCustomerEntity
- Returns:
- the creation time (in seconds)
- See Also:
-
setCreationTime
-
setCreationTime
-
getWaitTime
public double getWaitTime()Description copied from interface:CustomerEntity
Gets the total time the entity had to wait before being created, either due to a givensubmission delay
or because there was no suitable Host available after the VM submission.- Specified by:
getWaitTime
in interfaceCustomerEntity
- Returns:
- the total wait time (in seconds)
- See Also:
-
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:
-
setLastTriedDatacenter
Description copied from interface:CustomerEntity
Sets the last Datacenter where entity was tried to be created.- Specified by:
setLastTriedDatacenter
in interfaceCustomerEntity
-
getLastTriedDatacenter
Description copied from interface:CustomerEntity
Gets the last Datacenter where entity was tried to be created.- Specified by:
getLastTriedDatacenter
in interfaceCustomerEntity
-
equals
-
hashCode
public final int hashCode()
-