cloudsim-plus-master/cloudsim-plus-master/cloudsim-plus/src/main/java/org/cloudbus/cloudsim/datacenters/DatacenterSimple.java
private int processVmEvents(final SimEvent ev) {
        switch (ev.getTag()) {
            case CloudSimTags.VM_CREATE:
                processVmCreate(ev, false);
                return 1;
            case CloudSimTags.VM_CREATE_ACK:
                processVmCreate(ev, true);
                return 1;
            case CloudSimTags.VM_VERTICAL_SCALING:
                return BooleanUtils.toInteger(requestVmVerticalScaling(ev));
            case CloudSimTags.VM_DESTROY:
                processVmDestroy(ev, false);
                return 1;
            case CloudSimTags.VM_DESTROY_ACK:
                processVmDestroy(ev, true);
                return 1;
            case CloudSimTags.VM_MIGRATE:
                processVmMigrate(ev, false);
                return 1;
            case CloudSimTags.VM_MIGRATE_ACK:
                processVmMigrate(ev, true);
                return 1;
            case CloudSimTags.VM_DATA_ADD:
                processDataAdd(ev, false);
                return 1;
            case CloudSimTags.VM_DATA_ADD_ACK:
                processDataAdd(ev, true);
                return 1;
            case CloudSimTags.VM_DATA_DEL:
                processDataDelete(ev, false);
                return 1;
            case CloudSimTags.VM_DATA_DEL_ACK:
                processDataDelete(ev, true);
                return 1;
            case CloudSimTags.VM_UPDATE_CLOUDLET_PROCESSING_EVENT:
                updateCloudletProcessing();
                checkCloudletsCompletionForAllHosts();
                return 1;
        }

        return 0;
    }
/**
     * Process a received event.
     * @param ev the event to be processed
     * @return 1 if the event was processed, 0 otherwise
     */
Process a received event.
@param ev the event to be processed
@return 1 if the event was processed, 0 otherwise
Process a received event . @param ev the event to be processed @return 1 if the event was processed 0 otherwise
private int processVmEvents(final SimEvent ev) {
        switch (ev.getTag()) {
            case CloudSimTags.VM_CREATE:
                processVmCreate(ev, false);
                return 1;
            case CloudSimTags.VM_CREATE_ACK:
                processVmCreate(ev, true);
                return 1;
            case CloudSimTags.VM_VERTICAL_SCALING:
                return BooleanUtils.toInteger(requestVmVerticalScaling(ev));
            case CloudSimTags.VM_DESTROY:
                processVmDestroy(ev, false);
                return 1;
            case CloudSimTags.VM_DESTROY_ACK:
                processVmDestroy(ev, true);
                return 1;
            case CloudSimTags.VM_MIGRATE:
                processVmMigrate(ev, false);
                return 1;
            case CloudSimTags.VM_MIGRATE_ACK:
                processVmMigrate(ev, true);
                return 1;
            case CloudSimTags.VM_DATA_ADD:
                processDataAdd(ev, false);
                return 1;
            case CloudSimTags.VM_DATA_ADD_ACK:
                processDataAdd(ev, true);
                return 1;
            case CloudSimTags.VM_DATA_DEL:
                processDataDelete(ev, false);
                return 1;
            case CloudSimTags.VM_DATA_DEL_ACK:
                processDataDelete(ev, true);
                return 1;
            case CloudSimTags.VM_UPDATE_CLOUDLET_PROCESSING_EVENT:
                updateCloudletProcessing();
                checkCloudletsCompletionForAllHosts();
                return 1;
        }
        return 0;
    }
private int processVmEvents ( final SimEvent ev ) { switch ( ev . getTag ( ) ) { case CloudSimTags . VM_CREATE : processVmCreate ( ev , false ) ; return 1 ; case CloudSimTags . VM_CREATE_ACK : processVmCreate ( ev , true ) ; return 1 ; case CloudSimTags . VM_VERTICAL_SCALING : return BooleanUtils . toInteger ( requestVmVerticalScaling ( ev ) ) ; case CloudSimTags . VM_DESTROY : processVmDestroy ( ev , false ) ; return 1 ; case CloudSimTags . VM_DESTROY_ACK : processVmDestroy ( ev , true ) ; return 1 ; case CloudSimTags . VM_MIGRATE : processVmMigrate ( ev , false ) ; return 1 ; case CloudSimTags . VM_MIGRATE_ACK : processVmMigrate ( ev , true ) ; return 1 ; case CloudSimTags . VM_DATA_ADD : processDataAdd ( ev , false ) ; return 1 ; case CloudSimTags . VM_DATA_ADD_ACK : processDataAdd ( ev , true ) ; return 1 ; case CloudSimTags . VM_DATA_DEL : processDataDelete ( ev , false ) ; return 1 ; case CloudSimTags . VM_DATA_DEL_ACK : processDataDelete ( ev , true ) ; return 1 ; case CloudSimTags . VM_UPDATE_CLOUDLET_PROCESSING_EVENT : updateCloudletProcessing ( ) ; checkCloudletsCompletionForAllHosts ( ) ; return 1 ; } return 0 ; }
Process a received event.
Process a received event .