Package org.cloudsimplus.listeners
Class DatacenterVmMigrationEventInfo
java.lang.Object
org.cloudsimplus.listeners.DatacenterVmMigrationEventInfo
- All Implemented Interfaces:
DatacenterEventInfo
,EventInfo
,VmDatacenterEventInfo
,VmEventInfo
An interface that represent data to be passed
to
EventListener
objects that are registered to be notified
when a VM migration is successful or not.- Since:
- CloudSim Plus 6.0.3
- Author:
- Manoel Campos da Silva Filho
-
Method Summary
Modifier and TypeMethodDescriptionGets theDatacenter
for which the event happened.Gets information about the suitability of the Host for the given VM.Gets the listener that was notified about the event.double
getTime()
Gets the time the event happened.getVm()
Gets the VM that started a migration process.boolean
Indicates if the VM was successfully migrated or not.of
(EventListener<DatacenterVmMigrationEventInfo> listener, Vm vm, HostSuitability suitability) Gets a VmDatacenterEventInfo instance from the given parameters.
-
Method Details
-
getVm
Gets the VM that started a migration process.- Specified by:
getVm
in interfaceVmEventInfo
- Returns:
-
getDatacenter
Description copied from interface:DatacenterEventInfo
Gets theDatacenter
for which the event happened.- Specified by:
getDatacenter
in interfaceDatacenterEventInfo
- Returns:
-
getTime
public double getTime()Description copied from interface:EventInfo
Gets the time the event happened. -
isMigrationSuccessful
public boolean isMigrationSuccessful()Indicates if the VM was successfully migrated or not.- Returns:
-
getHostSuitability
Gets information about the suitability of the Host for the given VM.- Returns:
-
getListener
Description copied from interface:EventInfo
Gets the listener that was notified about the event.- Specified by:
getListener
in interfaceEventInfo
- Returns:
-
of
public static DatacenterVmMigrationEventInfo of(EventListener<DatacenterVmMigrationEventInfo> listener, Vm vm, HostSuitability suitability) Gets a VmDatacenterEventInfo instance from the given parameters. TheDatacenter
attribute is defined as theDatacenter
where theVm
is running and thegetTime()
is the current simulation time..- Parameters:
listener
- the listener to be notified about the eventvm
- theVm
that fired the eventsuitability
- information about the suitability of the Host for the given VM.
-