/** * Processes a Cloudlet pause request. * * @param cloudletId ID of the cloudlet to be paused * @param userId ID of the cloudlet's owner * @param ack indicates if the event's sender expects to receive * an acknowledge message when the event finishes to be processed * @param vmId the id of the VM where the cloudlet has to be paused * * @pre $none * @post $none */ protected void processCloudletPause(int cloudletId, int userId, int vmId, boolean ack) { boolean status = getVmAllocationPolicy().getHost(vmId, userId).getVm(vmId,userId) .getCloudletScheduler().cloudletPause(cloudletId); if (ack) { int[] data = new int[3]; data[0] = getId(); data[1] = cloudletId; if (status) { data[2] = CloudSimTags.TRUE; } else { data[2] = CloudSimTags.FALSE; } sendNow(userId, CloudSimTags.CLOUDLET_PAUSE_ACK, data); } }