PureEdgeSim -taskgenerator package-Task file

Task interface summary:

Reason for task failure

 /**
* Enumeration for failure reasons of a Task.
*/
enum FailureReason {<!-- -->
FAILED_DUE_TO_LATENCY, FAILED_BECAUSE_DEVICE_DEAD, FAILED_DUE_TO_DEVICE_MOBILITY,
NOT_GENERATED_BECAUSE_DEVICE_DEAD, NO_OFFLOADING_DESTINATIONS, INSUFFICIENT_RESOURCES, INSUFFICIENT_POWER
}

Mission success or failure

 /**
* Enumeration for status of a Task.
*/
enum Status {<!-- -->
SUCCESS, FAILED
}

Maximum delay in returning tasks

 /**
* Returns the maximum latency of the Task.
*
* @return the maximum latency of the Task
*/
double getMaxLatency();

Set maximum delay for tasks

 /**
* Sets the maximum latency of the Task.
*
* @param maxLatency the maximum latency of the Task
* @return the updated Task
*/
Task setMaxLatency(double maxLatency);

Returns the real network time of the task

 /**
* Returns the actual network time of the Task.
*
* @return the actual network time of the Task
*/
double getActualNetworkTime();

Add real network time

 /**
* Adds the actual network time of the Task.
*
* @param actualNetworkTime the actual network time of the Task
*/
void addActualNetworkTime(double actualNetworkTime);

Returns the CPU of the task

 /**
* Returns the actual CPU time of the Task.
*
* @return the actual CPU time of the Task
*/
double getActualCpuTime();

Returns the start time of the task

 /**
* Returns the execution start time of the Task.
*
* @return the execution start time of the Task
*/
double getExecStartTime();

Return the waiting time of the task

 /**
* Returns the waiting time of the Task.
*
* @return the waiting time of the Task
*/
double getWatingTime();

Set task arrival time

 /**
* Sets the arrival time of the Task.
*
* @param clock the arrival time of the Task
*/
void setArrivalTime(double clock);

Set the start execution time of the task

 /**
* Sets the execution start time of the Task.
*
* @param clock the execution start time of the Task
*/
void setExecutionStartTime(double clock);

Set execution completion time

 /**
* Sets the execution finish time of the Task.
*
* @param clock the execution finish time of the Task
*/
void setExecutionFinishTime(double clock);

Set task ID

 /**
* Sets the ID of the Task.
*
* @param id the ID of the Task
*/
void setId(int id);

Get task ID

 /**
* Returns the ID of the Task.
*
* @return the ID of the Task
*/
int getId();

Set task time

 /**
*
* Sets the time of the task.
*
* @param time the time to set
*/
void setTime(double time);

Get task time

 /**
*
* Gets the time of the task.
*
* @return the time of the task
*/
double getTime();

Returns the edge node where the task is executed

 /**
*
* Gets the edge device associated with the task.
*
* @return the edge device associated with the task
*/
ComputingNode getEdgeDevice();

Set edge nodes for task execution

 /**
*
* Sets the edge device associated with the task.
*
* @param device the edge device to set
* @return the updated Task object
*/
Task setEdgeDevice(ComputingNode device);

Task module size

 /**
*
* Sets the container size of the task in bits.
*
* @param containerSize the container size to set in bits
* @return the updated Task object
*/
Task setContainerSizeInBits(long containerSize);

Get task container size

 /**
*
* Gets the container size of the task in bits.
*
* @return the container size of the task in bits
*/
long getContainerSizeInBits();

Get task container size

 /**
*
* Gets the container size of the task in megabytes.
*
* @return the container size of the task in megabytes
*/
double getContainerSizeInMBytes();

get orchestrator

 /**
*
* Gets the orchestrator associated with the task.
*
* @return the orchestrator associated with the task
*/
ComputingNode getOrchestrator();

Returns the registration node of the task

 /**
*
* Gets the registry associated with the task.
*
* @return the registry associated with the task
*/
ComputingNode getRegistry();

Set the registration node of the task

 /**
*
* Sets the registry associated with the task.
*
* @param registry the registry to set
* @return the updated Task object
*/
Task setRegistry(ComputingNode registry);

Get the application ID

 /**
*
* Gets the ID of the application associated with the task.
*
* @return the ID of the application associated with the task
*/
int getApplicationID();

Set application ID

 /**
*
* Sets the ID of the application associated with the task.
*
* @param applicationID the ID of the application to set
* @return the updated Task object
*/
Task setApplicationID(int applicationID);

Get the reason for failure

 /**
*
* Gets the reason for task failure.
*
* @return the reason for task failure
*/
FailureReason getFailureReason();

Reason for setup failure

 /**
*
* Sets the reason for task failure.
*
* @param reason the reason for task failure to set
*/
void setFailureReason(FailureReason reason);

Get the target node for task offloading

 /**
*
* Gets the offloading destination associated with the task.
*
* @return the offloading destination associated with the task
*/
ComputingNode getOffloadingDestination();

Set uninstall target

 /**
*
* Sets the offloading destination associated with the task.
*
* @param applicationPlacementLocation the offloading destination to set
*/
void setOffloadingDestination(ComputingNode applicationPlacementLocation);

Set the file size required for the task

 /**
*
* Sets the file size of the task request in bits.
*
* @param requestSize the file size of the task request to set in bits
* @return the updated Task object
*/
Task setFileSizeInBits(long requestSize);

Set file size for task output

 /**
*
* Sets the output size of the task in bits.
*
* @param outputSize the output size of the task to set in bits
* @return the updated Task object
*/
Task setOutputSizeInBits(long outputSize);

get task length

 /**
*
* Gets the length of the task.
*
* @return the length of the task
*/
double getLength();

Get the file size required by the task

 /**
*
* Gets the file size of the task request in bits.
*
* @return the file size of the task request in bits
*/
double getFileSizeInBits();

Get the output file size of a task

 /**
*
* Gets the output size of the task in bits.
*
* @return the output size of the task in bits
*/
double getOutputSizeInBits();

Set the status of the task (success or failure)

 /**
*
* Sets the status of the task.
*
* @param status the status of the task
*/
void setStatus(Status status);

Get the status of a task

 /**
*
* Gets the status of the task.
*
* @return the status of the task
*/
Status getStatus();

Get task type

 /**
*
* Gets the type of the task.
*
* @return the type of the task
*/
String getType();

Set task type

 /**
*
* Sets the type of the task.
*
* @param type the type of the task
* @return the task with the updated type
*/
Task setType(String type);

Set task length

 /**
*
* Sets the length of the task.
*
* @param length the length of the task
* @return the task with the updated length
*/
Task setLength(double length);

Set the task’s orchestrator node

 /**
*
* Sets the orchestrator node of the task.
*
* @param orchestrator the orchestrator node of the task
*/
void setOrchestrator(ComputingNode orchestrator);

Get the total latency of a task

 /**
*
* Gets the total delay of the task.
*
* @return the total delay of the task
*/
double getTotalDelay();

Set the number of task sequences

 /**
*
* Sets the serial number of the task.
*
* @param l the serial number of the task
*/
void setSerial(long l);

Get the number of task sequences

 /**
*
* Gets the serial number of the task.
*
* @return the serial number of the task
*/
long getSerial();