Package org.cloudsimplus.listeners
EventListener
implementations to enable event notifications during simulation execution.
These notifications are related to changes in the state of simulation entities. The listeners enable, for instance, notifying when:
- a Host updates the processing of its VMs, it is allocated to a Vm, or it is deallocated from a Vm;
- a Vm has its processing updated or fails to be placed at a Host due to lack of resources;
- a Cloudlet has its processing updated, or it finishes its execution inside a Vm;
- a simulation processes any kind of event.
These listeners were implemented using Java 8+ functional interfaces, enabling the use of Lambda Expressions that allow a function reference to be passed as parameter to another function. Such a reference will be used to automatically call the function every time the listened event is fired. Researchers developing using just Java 7 features can also use these listeners in the old-way by passing an anonymous class to them.
Listeners allow developers to perform specific tasks when different events happen. They can be largely used for monitoring purposes, metrics collection and dynamic creation of objects, such as VMs and Cloudlets, at runtime.
- Author:
- Manoel Campos da Silva Filho
-
ClassDescriptionAn interface that represents data to be passed to
EventListenerobjects that are registered to be notified when some events happen for a givenCloudlet.An interface that represents data to be passed toEventListenerobjects that are registered to be notified when aCloudletScheduleris not able to allocate the amount of resource aCloudletis requesting due to lack of available capacity.An interface that represents data to be passed toEventListenerobjects that are registered to be notified when some events happen for a givenCloudletrunning inside aVm.An interface that represents data to be passed toEventListenerobjects that are registered to be notified when some events happen for a givenDatacenterBroker.An interface that represents data to be passed toEventListenerobjects that are registered to be notified when some events happen for a givenDatacenter.An interface that represents data to be passed toEventListenerobjects that are registered to be notified when aVmmigration is successful or not.A general interface that represents data to be passed toEventListenerobjects that are registered to be notified when some events happen for a given simulation entity (such as aDatacenter,Host,Vm,Cloudletand so on).EventListener<T extends EventInfo>An interface to define Observers (Listeners) that listen to specific changes in the state of a given observable object (Subject).An interface that represents data to be passed toEventListenerobjects that are registered to be notified when some events happen for a givenHost.An interface that represents data to be passed toEventListenerobjects that are registered to be notified after aHostupdates the processing of itsVms.An interface that represents data to be passed toEventListenerobjects that are registered to be notified when some events happen for a givenVmrunning inside aDatacenter.An interface that represents data to be passed toEventListenerobjects that are registered to be notified when some events happen for a givenVm.An interface that represents data to be passed toEventListenerobjects that are registered to be notified when some events happen for a givenVmthat is related to someHost.