cloudsim-plus-master/cloudsim-plus-master/cloudsim-plus-examples/src/main/java/org/cloudsimplus/examples/listeners/CloudletListenersExample1.java
private Cloudlet createCloudlet(int id, Vm vm, long length) {
        long fileSize = 300;
        long outputSize = 300;
        int pesNumber = 1;
        UtilizationModel utilizationModel = new UtilizationModelFull();
        Cloudlet cloudlet
            = new CloudletSimple(id, length, pesNumber)
                    .setFileSize(fileSize)
                    .setOutputSize(outputSize)
                    .setUtilizationModel(utilizationModel)
                    .setVm(vm)
                    .addOnFinishListener(this::onCloudletFinishListener);

        return cloudlet;
    }
/**
     * Creates a cloudlet with pre-defined configuration.
     *
     * @param id Cloudlet id
     * @param vm vm to run the cloudlet
     * @param length the cloudlet length in number of Million Instructions (MI)
     * @return the created cloudlet
     */
Creates a cloudlet with pre-defined configuration.
@param id Cloudlet id
@param vm vm to run the cloudlet
@param length the cloudlet length in number of Million Instructions (MI)
@return the created cloudlet
Creates a cloudlet with pre - defined configuration . @param id Cloudlet id @param vm vm to run the cloudlet @param length the cloudlet length in number of Million Instructions ( MI ) @return the created cloudlet
private Cloudlet createCloudlet(int id, Vm vm, long length) {
        long fileSize = 300;
        long outputSize = 300;
        int pesNumber = 1;
        UtilizationModel utilizationModel = new UtilizationModelFull();
        Cloudlet cloudlet
            = new CloudletSimple(id, length, pesNumber)
                    .setFileSize(fileSize)
                    .setOutputSize(outputSize)
                    .setUtilizationModel(utilizationModel)
                    .setVm(vm)
                    .addOnFinishListener(this::onCloudletFinishListener);
        return cloudlet;
    }
private Cloudlet createCloudlet ( int id , Vm vm , long length ) { long fileSize = 300 ; long outputSize = 300 ; int pesNumber = 1 ; UtilizationModel utilizationModel = new UtilizationModelFull ( ) ; Cloudlet cloudlet = new CloudletSimple ( id , length , pesNumber ) . setFileSize ( fileSize ) . setOutputSize ( outputSize ) . setUtilizationModel ( utilizationModel ) . setVm ( vm ) . addOnFinishListener ( this :: onCloudletFinishListener ) ; return cloudlet ; }
Creates a cloudlet with pre-defined configuration.
Creates a cloudlet with pre - defined configuration .