Files
edgecloudsim/src/edu/boun/edgecloudsim/edge_client/Task.java
Cagatay Sonmez d4545f009f major modifications for v2.0 release
Release notes

1- Cloud server processing was simplified in the initial version, it is handled via cloudsim components now.

2- Cloud server manager, edge server manager, mobile device manager and vm allocation policy are used as abstract class in factory pattern to allow developers to use different business logic without modifying EdgeCloudSim source code.

3- The task and place types are no longer defined as enumeration. They are used as integer value in order to manipulate more place type without modifying enum variable.

4- Two sample applications (one of them is simple and the other one extended application) are added along with the corresponding matlab files to plot statistics.

5- Cloud server properties are added to the simulation settings file

6- New log items are added to simulation result files

7- Code refactoring is applied including the modification of comments
2018-09-10 14:22:27 +03:00

84 lines
2.0 KiB
Java

/*
* Title: EdgeCloudSim - Task
*
* Description:
* Task adds app type, task submission location, mobile device id and host id
* information to CloudSim's Cloudlet class.
*
* Licence: GPL - http://www.gnu.org/copyleft/gpl.html
* Copyright (c) 2017, Bogazici University, Istanbul, Turkey
*/
package edu.boun.edgecloudsim.edge_client;
import org.cloudbus.cloudsim.Cloudlet;
import org.cloudbus.cloudsim.UtilizationModel;
import edu.boun.edgecloudsim.utils.Location;
public class Task extends Cloudlet {
private Location submittedLocation;
private int type;
private int mobileDeviceId;
private int hostIndex;
private int vmIndex;
private int datacenterId;
public Task(int _mobileDeviceId, int cloudletId, long cloudletLength, int pesNumber,
long cloudletFileSize, long cloudletOutputSize,
UtilizationModel utilizationModelCpu,
UtilizationModel utilizationModelRam,
UtilizationModel utilizationModelBw) {
super(cloudletId, cloudletLength, pesNumber, cloudletFileSize,
cloudletOutputSize, utilizationModelCpu, utilizationModelRam,
utilizationModelBw);
mobileDeviceId = _mobileDeviceId;
}
public void setSubmittedLocation(Location _submittedLocation){
submittedLocation =_submittedLocation;
}
public void setAssociatedDatacenterId(int _datacenterId){
datacenterId=_datacenterId;
}
public void setAssociatedHostId(int _hostIndex){
hostIndex=_hostIndex;
}
public void setAssociatedVmId(int _vmIndex){
vmIndex=_vmIndex;
}
public void setTaskType(int _type){
type=_type;
}
public int getMobileDeviceId(){
return mobileDeviceId;
}
public Location getSubmittedLocation(){
return submittedLocation;
}
public int getAssociatedDatacenterId(){
return datacenterId;
}
public int getAssociatedHostId(){
return hostIndex;
}
public int getAssociatedVmId(){
return vmIndex;
}
public int getTaskType(){
return type;
}
}