CloudletSendTask

public class CloudletSendTask extends CloudletTask

Represents a task executed by a NetworkCloudlet that sends data to a CloudletReceiveTask.

Please refer to following publication for more details:

Author:Saurabh Kumar Garg, Manoel Campos da Silva Filho

Constructors

CloudletSendTask

public CloudletSendTask(int id)

Creates a new task.

Parameters:
  • id – task id

Methods

addPacket

public VmPacket addPacket(Cloudlet destinationCloudlet, long dataLength)

Creates and add a packet to the list of packets to be sent to a Cloudlet that is inside a specific VM.

Parameters:
  • destinationCloudlet – destination cloudlet to send packets to
  • dataLength – the number of data bytes of the packet to create
Throws:
Returns:

the created packet

getPacketsToSend

public List<VmPacket> getPacketsToSend()
Returns:a read-only list of packets to send

getPacketsToSend

public List<VmPacket> getPacketsToSend(double sendTime)

Gets the list of packets to send, updating the send time to the given time and clearing the list of packets, marking the task as finished.

Parameters:
  • sendTime – the send time to update all packets in the list
Returns:

the packet list with the send time updated to the given time