Class CloudletTask
java.lang.Object
org.cloudsimplus.cloudlets.network.CloudletTask
- All Implemented Interfaces:
Identifiable
- Direct Known Subclasses:
CloudletExecutionTask,CloudletReceiveTask,CloudletSendTask
An abstract class to be implemented by tasks that can be executed by a
NetworkCloudlet.
Please refer to the following publication for more details:
- Since:
- CloudSim Toolkit 1.0
TODO Classes
CloudletTask,CloudletandCloudletExecutionshare a common set of attributes that should be defined by a common interface. - Author:
- Saurabh Kumar Garg
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanisActive()Checks if the task is active (it's not finished).booleanbooleanChecks if the task is finished or not.booleanbooleanprotected voidsetFinished(boolean finished) Sets the task as finished or notMethods 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
-
CloudletTask
public CloudletTask(int id) Creates a task.- Parameters:
id- task id
-
-
Method Details
-
isFinished
public boolean isFinished()Checks if the task is finished or not.- Returns:
- true if the task has finished, false otherwise
- See Also:
-
isActive
public boolean isActive()Checks if the task is active (it's not finished).- Returns:
- true if the task is active, false otherwise
- See Also:
-
setFinished
protected void setFinished(boolean finished) Sets the task as finished or not- Parameters:
finished- true to set the task as finished, false otherwise- Throws:
RuntimeException- when the task is already finished, and you try to set it as unfinished
-
isExecutionTask
public boolean isExecutionTask() -
isSendTask
public boolean isSendTask() -
isReceiveTask
public boolean isReceiveTask()
-