cloudsim-plus-master/cloudsim-plus-master/cloudsim-plus-examples/src/main/java/org/cloudsimplus/examples/listeners/VmListenersExample3_DynamicVmCreation.java
private void onHostDeallocationListener(VmHostEventInfo eventInfo) {
        numberOfFinishedVms++;
        Log.printFormatted(
                "\t#EventListener: Vm %d finished running all its cloudlets at time %.0f. ",
                eventInfo.getVm().getId(), eventInfo.getTime());
        Log.printFormattedLine("VMs finished so far: %d", numberOfFinishedVms);

        createNextVmIfNotReachedMaxNumberOfVms();
    }
/**
     * A handler method that will be called when a VM
     * is removed from a host (in this case meaning that it has finished executing
     * its cloudlets). All VMs will use this same listener.
     *
     * @param eventInfo information about the happened event
     *
     * @see #createVm(int, DatacenterBroker)
     */
A handler method that will be called when a VM
is removed from a host (in this case meaning that it has finished executing
its cloudlets). All VMs will use this same listener.

@param eventInfo information about the happened event


A handler method that will be called when a VM is removed from a host ( in this case meaning that it has finished executing its cloudlets ) . All VMs will use this same listener . @param eventInfo information about the happened event
private void onHostDeallocationListener(VmHostEventInfo eventInfo) {
        numberOfFinishedVms++;
        Log.printFormatted(
                "\t#EventListener: Vm %d finished running all its cloudlets at time %.0f. ",
                eventInfo.getVm().getId(), eventInfo.getTime());
        Log.printFormattedLine("VMs finished so far: %d", numberOfFinishedVms);
        createNextVmIfNotReachedMaxNumberOfVms();
    }
private void onHostDeallocationListener ( VmHostEventInfo eventInfo ) { numberOfFinishedVms ++ ; Log . printFormatted ( "\t#EventListener: Vm %d finished running all its cloudlets at time %.0f. " , eventInfo . getVm ( ) . getId ( ) , eventInfo . getTime ( ) ) ; Log . printFormattedLine ( "VMs finished so far: %d" , numberOfFinishedVms ) ; createNextVmIfNotReachedMaxNumberOfVms ( ) ; }
A handler method that will be called when a VM
 is removed from a host (in this case meaning that it has finished executing
 its cloudlets).
A handler method that will be called when a VM is removed from a host ( in this case meaning that it has finished executing its cloudlets ) .