Class CloudletReceiveTask
java.lang.Object
org.cloudsimplus.cloudlets.network.CloudletTask
org.cloudsimplus.cloudlets.network.CloudletReceiveTask
- All Implemented Interfaces:
Identifiable
A task executed by a
NetworkCloudlet that
receives data from a CloudletSendTask.
Each receiver task expects to receive packets
from just one VM.
Please refer to the following publication for more details:
- Since:
- CloudSim Toolkit 1.0 TODO For how long will the task be waiting for packets? The sender task has a defined amount of packets to send, but the receiver doesn't have to know how many packets to wait for. Considering a real distributed app such as a web app, the sender can be a browser and the receiver a web server. In this case, the web server runs indefinitely. However, the simulation has to have a time interval. For instance, it may be simulated the operation of this distributed app for 24 hours. This way, the receiver task could have a specific amount of time to run. In the web app scenario, the web server just keep running, waiting for any client to send packets to it, but it is not required that a client do that. The web app may not be accessed during this time. On other hand, the client may send packets to the server and require a response. It then waits for this response and must have a timeout period, so that the client can: (i) stop waiting a reply, (ii) then move to the next task or finish. Each task has to have a status (such as the Cloudlet itself) to define if it was executed successfully or not. For instance, a CloudletReceiveTask that is waiting to receive a list of packets can be configured to finish after a given timeout without receiving the expected packets. How is the network delay being computed?
- Author:
- Saurabh Kumar Garg, Manoel Campos da Silva Filho
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidreceivePacket(VmPacket packet) Receives a packet sent from aCloudletSendTaskand add it to the received packet list.Methods inherited from class org.cloudsimplus.cloudlets.network.CloudletTask
isActive, isExecutionTask, isFinished, isReceiveTask, isSendTask, setFinishedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.cloudsimplus.core.Identifiable
getId
-
Constructor Details
-
CloudletReceiveTask
Creates a new task.- Parameters:
id- id to assign to the tasksourceVm- Vm from where packets are expected to be received
-
-
Method Details
-
receivePacket
Receives a packet sent from aCloudletSendTaskand add it to the received packet list.- Parameters:
packet- the packet received
-
getPacketsReceived
-