Commit 817a6782 authored by Manoel Campos's avatar Manoel Campos

Removal of duplicated documentation on methods inherited from a superclass or interface.

The documentation was updated in subclasses that effectively had any difference from the inherited class/interface.
In these cases, the tag {@inheritDoc} was used to extend the documentation in the subclass and avoid documentation duplication.
parent 35c31997
......@@ -5,7 +5,6 @@
*
* Copyright (c) 2009-2012, The University of Melbourne, Australia
*/
package org.cloudbus.cloudsim;
import java.text.DecimalFormat;
......@@ -16,8 +15,8 @@ import java.util.List;
import org.cloudbus.cloudsim.core.CloudSim;
/**
* Cloudlet is an extension to the cloudlet.
* It stores, despite all the information encapsulated in the Cloudlet, the ID of the VM running it.
* Cloudlet is an extension to the cloudlet. It stores, despite all the
* information encapsulated in the Cloudlet, the ID of the VM running it.
*
* @author Rodrigo N. Calheiros
* @author Anton Beloglazov
......@@ -25,24 +24,28 @@ import org.cloudbus.cloudsim.core.CloudSim;
* @todo The documentation is wrong. Cloudlet isn't extending any class.
*/
public class Cloudlet {
/** The cloudlet ID. */
/**
* The cloudlet ID.
*/
private final int cloudletId;
/**
* The User or Broker ID. It is advisable that broker set this ID with its own ID, so that
* CloudResource returns to it after the execution.
**/
* The User or Broker ID. It is advisable that broker set this ID with its
* own ID, so that CloudResource returns to it after the execution.
*
*/
private int userId;
/**
* The execution length of this Cloudlet (Unit: in Million Instructions (MI)).
* According to this length and the power of the processor
* (in Million Instruction Per Second - MIPS)
* where the cloudlet will be run, the cloudlet will take a given time
* to finish processing. For instance, for a cloudlet of 10000 MI
* running on a processor of 2000 MIPS, the cloudlet will
* spend 5 seconds using the processor in order to be completed
* (that may be uninterrupted or not, depending on the scheduling policy).
* The execution length of this Cloudlet (Unit: in Million Instructions
* (MI)). According to this length and the power of the processor (in
* Million Instruction Per Second - MIPS) where the cloudlet will be run,
* the cloudlet will take a given time to finish processing. For instance,
* for a cloudlet of 10000 MI running on a processor of 2000 MIPS, the
* cloudlet will spend 5 seconds using the processor in order to be
* completed (that may be uninterrupted or not, depending on the scheduling
* policy).
*
* @see #setNumberOfPes(int)
*
......@@ -55,138 +58,204 @@ public class Cloudlet {
*/
private final long cloudletFileSize;
/** The output file size of this Cloudlet after execution (unit: in byte).
* @todo See <a href="https://groups.google.com/forum/#!topic/cloudsim/MyZ7OnrXuuI">this discussion</a>
/**
* The output file size of this Cloudlet after execution (unit: in byte).
*
* @todo See
* <a href="https://groups.google.com/forum/#!topic/cloudsim/MyZ7OnrXuuI">this
* discussion</a>
*/
private final long cloudletOutputSize;
/** The number of Processing Elements (Pe) required to execute this cloudlet (job).
/**
* The number of Processing Elements (Pe) required to execute this cloudlet
* (job).
*
* @see #setNumberOfPes(int)
*/
private int numberOfPes;
/** The execution status of this Cloudlet.
/**
* The execution status of this Cloudlet.
*
* @todo It would be an enum, to avoid using int constants.
*/
private int status;
/**
* The execution start time of this Cloudlet. With new functionalities, such as CANCEL, PAUSED and
* RESUMED, this attribute only stores the latest execution time. Previous execution time are
* ignored.
* The execution start time of this Cloudlet. With new functionalities, such
* as CANCEL, PAUSED and RESUMED, this attribute only stores the latest
* execution time. Previous execution time are ignored.
*/
private double execStartTime;
/** The time where this Cloudlet completes. */
/**
* The time where this Cloudlet completes.
*/
private double finishTime;
/** The ID of a reservation made for this cloudlet.
/**
* The ID of a reservation made for this cloudlet.
*
* @todo This attribute doesn't appear to be used
*/
private int reservationId = -1;
/** Indicates if transaction history records for this Cloudlet
* is to be outputted. */
/**
* Indicates if transaction history records for this Cloudlet is to be
* outputted.
*/
private final boolean record;
/** Stores the operating system line separator. */
/**
* Stores the operating system line separator.
*/
private String newline;
/** The cloudlet transaction history. */
/**
* The cloudlet transaction history.
*/
private StringBuffer history;
/** The list of every resource where the cloudlet has been executed.
In case it starts and finishes executing in a single cloud resource,
without being migrated, this list will have only one item.*/
/**
* The list of every resource where the cloudlet has been executed. In case
* it starts and finishes executing in a single cloud resource, without
* being migrated, this list will have only one item.
*/
private final List<Resource> resList;
/** The index of the last resource where the cloudlet was executed.
If the cloudlet is migrated during its execution, this index
is updated. The value -1 indicates the cloudlet has not been executed
yet.*/
/**
* The index of the last resource where the cloudlet was executed. If the
* cloudlet is migrated during its execution, this index is updated. The
* value -1 indicates the cloudlet has not been executed
yet.
*/
private int index;
/** The classType or priority of this Cloudlet for scheduling on a resource. */
/**
* The classType or priority of this Cloudlet for scheduling on a resource.
*/
private int classType;
/** The Type of Service (ToS) of IPv4 for sending Cloudlet over the network. */
/**
* The Type of Service (ToS) of IPv4 for sending Cloudlet over the network.
*/
private int netToS;
/** The format of decimal numbers. */
/**
* The format of decimal numbers.
*/
private DecimalFormat num;
// //////////////////////////////////////////
// Below are CONSTANTS attributes
/** The Cloudlet has been created and added to the CloudletList object. */
/**
* The Cloudlet has been created and added to the CloudletList object.
*/
public static final int CREATED = 0;
/** The Cloudlet has been assigned to a CloudResource object to be executed as planned. */
/**
* The Cloudlet has been assigned to a CloudResource object to be executed
* as planned.
*/
public static final int READY = 1;
/** The Cloudlet has moved to a Cloud node. */
/**
* The Cloudlet has moved to a Cloud node.
*/
public static final int QUEUED = 2;
/** The Cloudlet is in execution in a Cloud node. */
/**
* The Cloudlet is in execution in a Cloud node.
*/
public static final int INEXEC = 3;
/** The Cloudlet has been executed successfully. */
/**
* The Cloudlet has been executed successfully.
*/
public static final int SUCCESS = 4;
/** The Cloudlet has failed. */
/**
* The Cloudlet has failed.
*/
public static final int FAILED = 5;
/** The Cloudlet has been canceled. */
/**
* The Cloudlet has been canceled.
*/
public static final int CANCELED = 6;
/**
* The Cloudlet has been paused. It can be resumed by changing the status into <tt>RESUMED</tt>.
* The Cloudlet has been paused. It can be resumed by changing the status
* into <tt>RESUMED</tt>.
*/
public static final int PAUSED = 7;
/** The Cloudlet has been resumed from <tt>PAUSED</tt> state. */
/**
* The Cloudlet has been resumed from <tt>PAUSED</tt> state.
*/
public static final int RESUMED = 8;
/** The cloudlet has failed due to a resource failure. */
/**
* The cloudlet has failed due to a resource failure.
*/
public static final int FAILED_RESOURCE_UNAVAILABLE = 9;
/** The id of the vm that is planned to execute the cloudlet. */
/**
* The id of the vm that is planned to execute the cloudlet.
*/
protected int vmId;
/** The cost of each byte of bandwidth (bw) consumed. */
/**
* The cost of each byte of bandwidth (bw) consumed.
*/
protected double costPerBw;
/** The total bandwidth (bw) cost for transferring the cloudlet by the network,
* according to the {@link #cloudletFileSize}. */
/**
* The total bandwidth (bw) cost for transferring the cloudlet by the
* network, according to the {@link #cloudletFileSize}.
*/
protected double accumulatedBwCost;
// Utilization
/** The utilization model that defines how the cloudlet will use the VM's CPU. */
/**
* The utilization model that defines how the cloudlet will use the VM's
* CPU.
*/
private UtilizationModel utilizationModelCpu;
/** The utilization model that defines how the cloudlet will use the VM's RAM. */
/**
* The utilization model that defines how the cloudlet will use the VM's
* RAM.
*/
private UtilizationModel utilizationModelRam;
/** The utilization model that defines how the cloudlet will use the VM's bandwidth (bw). */
/**
* The utilization model that defines how the cloudlet will use the VM's
* bandwidth (bw).
*/
private UtilizationModel utilizationModelBw;
// Data cloudlet
/** The required files to be used by the cloudlet (if any).
* The time to transfer these files by the network is considered when
* placing the cloudlet inside a given VM */
/**
* The required files to be used by the cloudlet (if any). The time to
* transfer these files by the network is considered when placing the
* cloudlet inside a given VM
*/
private List<String> requiredFiles = null;
/**
* Allocates a new Cloudlet object. The Cloudlet length, input and output file sizes should be
* greater than or equal to 1. By default this constructor sets the history of this object.
* Allocates a new Cloudlet object. The Cloudlet length, input and output
* file sizes should be greater than or equal to 1. By default this
* constructor sets the history of this object.
*
* @param cloudletId the unique ID of this Cloudlet
* @param cloudletLength the length or size (in MI) of this cloudlet to be executed in a
* PowerDatacenter
* @param cloudletFileSize the file size (in byte) of this cloudlet <tt>BEFORE</tt> submitting
* to a Datacenter
* @param cloudletOutputSize the file size (in byte) of this cloudlet <tt>AFTER</tt> finish
* executing by a Datacenter
* @param cloudletLength the length or size (in MI) of this cloudlet to be
* executed in a PowerDatacenter
* @param cloudletFileSize the file size (in byte) of this cloudlet
* <tt>BEFORE</tt> submitting to a Datacenter
* @param cloudletOutputSize the file size (in byte) of this cloudlet
* <tt>AFTER</tt> finish executing by a Datacenter
* @param pesNumber the pes number
* @param utilizationModelCpu the utilization model of cpu
* @param utilizationModelRam the utilization model of ram
......@@ -218,23 +287,22 @@ public class Cloudlet {
utilizationModelBw,
false);
vmId = -1;
accumulatedBwCost = 0.0;
costPerBw = 0.0;
accumulatedBwCost = 0;
costPerBw = 0;
requiredFiles = new LinkedList<String>();
}
/**
* Allocates a new Cloudlet object. The Cloudlet length, input and output file sizes should be
* greater than or equal to 1.
* Allocates a new Cloudlet object. The Cloudlet length, input and output
* file sizes should be greater than or equal to 1.
*
* @param cloudletId the unique ID of this cloudlet
* @param cloudletLength the length or size (in MI) of this cloudlet to be executed in a
* PowerDatacenter
* @param cloudletFileSize the file size (in byte) of this cloudlet <tt>BEFORE</tt> submitting
* to a PowerDatacenter
* @param cloudletOutputSize the file size (in byte) of this cloudlet <tt>AFTER</tt> finish
* executing by a PowerDatacenter
* @param cloudletLength the length or size (in MI) of this cloudlet to be
* executed in a PowerDatacenter
* @param cloudletFileSize the file size (in byte) of this cloudlet
* <tt>BEFORE</tt> submitting to a PowerDatacenter
* @param cloudletOutputSize the file size (in byte) of this cloudlet
* <tt>AFTER</tt> finish executing by a PowerDatacenter
* @param record record the history of this object or not
* @param fileList list of files required by this cloudlet
* @param pesNumber the pes number
......@@ -277,16 +345,17 @@ public class Cloudlet {
}
/**
* Allocates a new Cloudlet object. The Cloudlet length, input and output file sizes should be
* greater than or equal to 1. By default this constructor sets the history of this object.
* Allocates a new Cloudlet object. The Cloudlet length, input and output
* file sizes should be greater than or equal to 1. By default this
* constructor sets the history of this object.
*
* @param cloudletId the unique ID of this Cloudlet
* @param cloudletLength the length or size (in MI) of this cloudlet to be executed in a
* PowerDatacenter
* @param cloudletFileSize the file size (in byte) of this cloudlet <tt>BEFORE</tt> submitting
* to a PowerDatacenter
* @param cloudletOutputSize the file size (in byte) of this cloudlet <tt>AFTER</tt> finish
* executing by a PowerDatacenter
* @param cloudletLength the length or size (in MI) of this cloudlet to be
* executed in a PowerDatacenter
* @param cloudletFileSize the file size (in byte) of this cloudlet
* <tt>BEFORE</tt> submitting to a PowerDatacenter
* @param cloudletOutputSize the file size (in byte) of this cloudlet
* <tt>AFTER</tt> finish executing by a PowerDatacenter
* @param fileList list of files required by this cloudlet
* @param pesNumber the pes number
* @param utilizationModelCpu the utilization model of cpu
......@@ -327,16 +396,16 @@ public class Cloudlet {
}
/**
* Allocates a new Cloudlet object. The Cloudlet length, input and output file sizes should be
* greater than or equal to 1.
* Allocates a new Cloudlet object. The Cloudlet length, input and output
* file sizes should be greater than or equal to 1.
*
* @param cloudletId the unique ID of this cloudlet
* @param cloudletLength the length or size (in MI) of this cloudlet to be executed in a
* PowerDatacenter
* @param cloudletFileSize the file size (in byte) of this cloudlet <tt>BEFORE</tt> submitting
* to a PowerDatacenter
* @param cloudletOutputSize the file size (in byte) of this cloudlet <tt>AFTER</tt> finish
* executing by a PowerDatacenter
* @param cloudletLength the length or size (in MI) of this cloudlet to be
* executed in a PowerDatacenter
* @param cloudletFileSize the file size (in byte) of this cloudlet
* <tt>BEFORE</tt> submitting to a PowerDatacenter
* @param cloudletOutputSize the file size (in byte) of this cloudlet
* <tt>AFTER</tt> finish executing by a PowerDatacenter
* @param record record the history of this object or not
* @param pesNumber the pes number
* @param utilizationModelCpu the utilization model of cpu
......@@ -392,47 +461,58 @@ public class Cloudlet {
}
// ////////////////////// INTERNAL CLASS ///////////////////////////////////
/**
* Internal class that keeps track of Cloudlet's movement in different CloudResources.
* Each time a cloudlet is run on a given VM, the cloudlet's execution history
* on each VM is registered at {@link Cloudlet#resList}
* Internal class that keeps track of Cloudlet's movement in different
* CloudResources. Each time a cloudlet is run on a given VM, the cloudlet's
* execution history on each VM is registered at {@link Cloudlet#resList}
*/
private static class Resource {
/** Cloudlet's submission (arrival) time to a CloudResource. */
/**
* Cloudlet's submission (arrival) time to a CloudResource.
*/
public double submissionTime = 0.0;
/**
* The time this Cloudlet resides in a CloudResource (from arrival time until departure
* time, that may include waiting time).
* The time this Cloudlet resides in a CloudResource (from arrival time
* until departure time, that may include waiting time).
*/
public double wallClockTime = 0.0;
/** The total time the Cloudlet spent being executed in a CloudResource. */
/**
* The total time the Cloudlet spent being executed in a CloudResource.
*/
public double actualCPUTime = 0.0;
/** Cost per second a CloudResource charge to execute this Cloudlet. */
/**
* Cost per second a CloudResource charge to execute this Cloudlet.
*/
public double costPerSec = 0.0;
/** Cloudlet's length finished so far. */
/**
* Cloudlet's length finished so far.
*/
public long finishedSoFar = 0;
/** a CloudResource id. */
/**
* a CloudResource id.
*/
public int resourceId = -1;
/** a CloudResource name. */
/**
* a CloudResource name.
*/
public String resourceName = null;
}
// ////////////////////// End of Internal Class //////////////////////////
/**
* Sets the id of the reservation made for this cloudlet.
*
* @param resId the reservation ID
* @return <tt>true</tt> if the ID has successfully been set or <tt>false</tt> otherwise.
* @return <tt>true</tt> if the ID has successfully been set or
* <tt>false</tt> otherwise.
*/
public boolean setReservationId(final int resId) {
if (resId <= 0) {
......@@ -456,7 +536,8 @@ public class Cloudlet {
/**
* Checks whether this Cloudlet is submitted by reserving or not.
*
* @return <tt>true</tt> if this Cloudlet has reserved before, <tt>false</tt> otherwise
* @return <tt>true</tt> if this Cloudlet has reserved before,
* <tt>false</tt> otherwise
*/
public boolean hasReserved() {
if (reservationId == -1) {
......@@ -466,12 +547,13 @@ public class Cloudlet {
}
/**
* Sets the length or size (in MI) of this Cloudlet to be executed in a CloudResource.
* It has to be the length for each individual Pe, <tt>not</tt> the total length (the sum of
* length to be executed by each Pe).
* Sets the length or size (in MI) of this Cloudlet to be executed in a
* CloudResource. It has to be the length for each individual Pe,
* <tt>not</tt> the total length (the sum of length to be executed by each
* Pe).
*
* @param cloudletLength the length or size (in MI) of this Cloudlet to be executed in a
* CloudResource
* @param cloudletLength the length or size (in MI) of this Cloudlet to be
* executed in a CloudResource
* @return <tt>true</tt> if it is successful, <tt>false</tt> otherwise
*
* @see #getCloudletTotalLength() }
......@@ -488,16 +570,18 @@ public class Cloudlet {
}
/**
* Sets the network service level (ToS) for sending this cloudlet over a network.
* Sets the network service level (ToS) for sending this cloudlet over a
* network.
*
* @param netServiceLevel determines the type of service (ToS) this cloudlet receives in the network
* (applicable to selected PacketScheduler class only)
* @param netServiceLevel determines the type of service (ToS) this cloudlet
* receives in the network (applicable to selected PacketScheduler class
* only)
* @return <code>true</code> if successful.
* @pre netServiceLevel >= 0
* @post $none
*
* @todo The name of the setter is inconsistent with the attribute name, what
* might be misinterpreted by other developers.
* @todo The name of the setter is inconsistent with the attribute name,
* what might be misinterpreted by other developers.
*/
public boolean setNetServiceLevel(final int netServiceLevel) {
boolean success = false;
......@@ -510,20 +594,22 @@ public class Cloudlet {
}
/**
* Gets the network service level (ToS) for sending this cloudlet over a network.
* Gets the network service level (ToS) for sending this cloudlet over a
* network.
*
* @return the network service level
* @pre $none
* @post $none
* @todo The name of the getter is inconsistent with the attribute name, what
* might be misinterpreted by other developers.
* @todo The name of the getter is inconsistent with the attribute name,
* what might be misinterpreted by other developers.
*/
public int getNetServiceLevel() {
return netToS;
}
/**
* Gets the time the cloudlet had to wait before start executing on a resource.
* Gets the time the cloudlet had to wait before start executing on a
* resource.
*
* @return the waiting time
* @pre $none
......@@ -540,7 +626,8 @@ public class Cloudlet {
}
/**
* Sets the classType or priority of this Cloudlet for scheduling on a resource.
* Sets the classType or priority of this Cloudlet for scheduling on a
* resource.
*
* @param classType classType of this Cloudlet
* @return <tt>true</tt> if it is successful, <tt>false</tt> otherwise
......@@ -559,7 +646,8 @@ public class Cloudlet {
}
/**
* Gets the classtype or priority of this Cloudlet for scheduling on a resource.
* Gets the classtype or priority of this Cloudlet for scheduling on a
* resource.
*
* @return classtype of this cloudlet
* @pre $none
......@@ -572,8 +660,8 @@ public class Cloudlet {
/**
* Sets the number of PEs required to run this Cloudlet. <br>
* NOTE: The Cloudlet length is computed only for 1 Pe for simplicity. <br>
* For example, consider a Cloudlet that has a length of 500 MI and requires 2 PEs.
* This means each Pe will execute 500 MI of this Cloudlet.
* For example, consider a Cloudlet that has a length of 500 MI and requires
* 2 PEs. This means each Pe will execute 500 MI of this Cloudlet.
*
* @param numberOfPes number of Pe
* @return <tt>true</tt> if it is successful, <tt>false</tt> otherwise
......@@ -602,9 +690,9 @@ public class Cloudlet {
}
/**
* Gets the transaction history of this Cloudlet.
* The layout of this history is in a readable table column
* with <tt>time</tt> and <tt>description</tt> as headers.
* Gets the transaction history of this Cloudlet. The layout of this history
* is in a readable table column with <tt>time</tt> and <tt>description</tt>
* as headers.
*
* @return a String containing the history of this Cloudlet object.
* @pre $none
......@@ -622,12 +710,12 @@ public class Cloudlet {
}
/**
* Gets the length of this Cloudlet that has been executed so far from the latest CloudResource.
* This method is useful when trying to move this Cloudlet into different CloudResources or to
* cancel it.
* Gets the length of this Cloudlet that has been executed so far from the
* latest CloudResource. This method is useful when trying to move this
* Cloudlet into different CloudResources or to cancel it.
*
* @return the length of a partially executed Cloudlet or the full Cloudlet length if it is
* completed
* @return the length of a partially executed Cloudlet or the full Cloudlet
* length if it is completed
* @pre $none
* @post $result >= 0.0
*/
......@@ -647,7 +735,8 @@ public class Cloudlet {
/**
* Checks whether this Cloudlet has finished execution or not.
*
* @return <tt>true</tt> if this Cloudlet has finished execution, <tt>false</tt> otherwise
* @return <tt>true</tt> if this Cloudlet has finished execution,
* <tt>false</tt> otherwise
* @pre $none
* @post $none
*/
......@@ -668,9 +757,9 @@ public class Cloudlet {
}
/**
* Sets the length of this Cloudlet that has been executed so far. This method is used by
* ResCloudlet class when an application is decided to cancel or to move this Cloudlet into
* different CloudResources.
* Sets the length of this Cloudlet that has been executed so far. This
* method is used by ResCloudlet class when an application is decided to
* cancel or to move this Cloudlet into different CloudResources.
*
* @param length length of this Cloudlet
* @see gridsim.AllocPolicy
......@@ -693,8 +782,9 @@ public class Cloudlet {
}
/**
* Sets the user or owner ID of this Cloudlet. It is <tt>VERY</tt> important to set the user ID,
* otherwise this Cloudlet will not be executed in a CloudResource.
* Sets the user or owner ID of this Cloudlet. It is <tt>VERY</tt> important
* to set the user ID, otherwise this Cloudlet will not be executed in a
* CloudResource.
*
* @param id the user ID
* @pre id >= 0
......@@ -733,7 +823,8 @@ public class Cloudlet {
}
/**
* Gets the input file size of this Cloudlet <tt>BEFORE</tt> submitting to a CloudResource.
* Gets the input file size of this Cloudlet <tt>BEFORE</tt> submitting to a
* CloudResource.
*
* @return the input file size of this Cloudlet
* @pre $none
......@@ -744,8 +835,8 @@ public class Cloudlet {
}
/**
* Gets the output size of this Cloudlet <tt>AFTER</tt> submitting and executing to a
* CloudResource.
* Gets the output size of this Cloudlet <tt>AFTER</tt> submitting and
* executing to a CloudResource.
*
* @return the Cloudlet output file size
* @pre $none
......@@ -756,12 +847,12 @@ public class Cloudlet {
}
/**
* Sets the resource parameters for which the Cloudlet is going to be executed.
* From the second time this method is called, every call make
* the cloudlet to be migrated to the indicated resource.<br>
* Sets the resource parameters for which the Cloudlet is going to be
* executed. From the second time this method is called, every call make the
* cloudlet to be migrated to the indicated resource.<br>
*
* NOTE: This method <tt>should</tt> be called only by a resource entity, not the user or owner
* of this Cloudlet.
* NOTE: This method <tt>should</tt> be called only by a resource entity,
* not the user or owner of this Cloudlet.
*
* @param resourceID the CloudResource ID
* @param cost the cost running this CloudResource per second
......@@ -813,7 +904,8 @@ public class Cloudlet {
}
/**
* Gets the submission (arrival) time of this Cloudlet from the latest CloudResource.
* Gets the submission (arrival) time of this Cloudlet from the latest
* CloudResource.
*
* @return the submission time or <tt>0.0</tt> if none
* @pre $none
......@@ -829,10 +921,9 @@ public class Cloudlet {
/**
* Sets the execution start time of this Cloudlet inside a CloudResource.
* <br/>
* <b>NOTE:</b> With new
* functionalities, such as being able to cancel / to pause / to resume this Cloudlet, the
* execution start time only holds the latest one. Meaning, all previous execution start time
* are ignored.
* <b>NOTE:</b> With new functionalities, such as being able to cancel / to
* pause / to resume this Cloudlet, the execution start time only holds the
* latest one. Meaning, all previous execution start time are ignored.
*
* @param clockTime the latest execution start time
* @pre clockTime >= 0.0
......@@ -857,12 +948,14 @@ public class Cloudlet {
}
/**
* Sets the Cloudlet's execution parameters. These parameters are set by the CloudResource
* before departure or sending back to the original Cloudlet's owner.
* Sets the Cloudlet's execution parameters. These parameters are set by the
* CloudResource before departure or sending back to the original Cloudlet's
* owner.
*
* @param wallTime the time of this Cloudlet resides in a CloudResource
* (from arrival time until departure time).
* @param actualTime the total execution time of this Cloudlet in a CloudResource.
* @param actualTime the total execution time of this Cloudlet in a
* CloudResource.
*
* @see Resource#wallClockTime
* @see Resource#actualCPUTime
......@@ -892,7 +985,8 @@ public class Cloudlet {
* @param newStatus the status code of this Cloudlet
* @throws Exception Invalid range of Cloudlet status
* @pre newStatus >= 0 && newStatus <= 8
* @post $none
* @
* post $none
*
* @todo It has to throw an specific (unckecked) exception
*/
......@@ -936,7 +1030,8 @@ public class Cloudlet {
/**
* Gets the string representation of the current Cloudlet status code.
*
* @return the Cloudlet status code as a string or <tt>null</tt> if the status code is unknown
* @return the Cloudlet status code as a string or <tt>null</tt> if the
* status code is unknown
* @pre $none
* @post $none
*/
......@@ -948,7 +1043,8 @@ public class Cloudlet {
* Gets the string representation of the given Cloudlet status code.
*
* @param status the Cloudlet status code
* @return the Cloudlet status code as a string or <tt>null</tt> if the status code is unknown
* @return the Cloudlet status code as a string or <tt>null</tt> if the
* status code is unknown
* @pre $none
* @post $none
*/
......@@ -1014,13 +1110,13 @@ public class Cloudlet {
}
/**
* Gets the total length (across all PEs) of this Cloudlet.
* It considers the {@link #cloudletLength} of the cloudlet to be executed
* in each Pe and the {@link #numberOfPes}.<br/>
* Gets the total length (across all PEs) of this Cloudlet. It considers the
* {@link #cloudletLength} of the cloudlet to be executed in each Pe and the
* {@link #numberOfPes}.<br/>
*
* For example, setting the cloudletLenght as 10000 MI and {@link #numberOfPes}
* to 4, each Pe will execute 10000 MI. Thus, the entire cloudlet
* has a total length of 40000 MI.
* For example, setting the cloudletLenght as 10000 MI and
* {@link #numberOfPes} to 4, each Pe will execute 10000 MI. Thus, the
* entire cloudlet has a total length of 40000 MI.
*
*
* @return the total length of this Cloudlet
......@@ -1036,7 +1132,8 @@ public class Cloudlet {
/**
* Gets the cost/sec of running the Cloudlet in the latest CloudResource.
*
* @return the cost associated with running this Cloudlet or <tt>0.0</tt> if none
* @return the cost associated with running this Cloudlet or <tt>0.0</tt> if
* none
* @pre $none
* @post $result >= 0.0
*/
......@@ -1048,8 +1145,8 @@ public class Cloudlet {
}
/**
* Gets the time of this Cloudlet resides in the latest CloudResource (from arrival time until
* departure time).
* Gets the time of this Cloudlet resides in the latest CloudResource (from
* arrival time until departure time).
*
* @return the time of this Cloudlet resides in a CloudResource
* @pre $none
......@@ -1105,11 +1202,12 @@ public class Cloudlet {
}
/**
* Gets the total execution time of this Cloudlet in a given CloudResource ID.
* Gets the total execution time of this Cloudlet in a given CloudResource
* ID.
*
* @param resId a CloudResource entity ID
* @return the total execution time of this Cloudlet in a CloudResource or <tt>0.0</tt> if not
* found
* @return the total execution time of this Cloudlet in a CloudResource or
* <tt>0.0</tt> if not found
* @pre resId >= 0
* @post $result >= 0.0
*/
......@@ -1125,7 +1223,8 @@ public class Cloudlet {
* Gets the cost running this Cloudlet in a given CloudResource ID.
*
* @param resId a CloudResource entity ID
* @return the cost associated with running this Cloudlet or <tt>0.0</tt> if not found
* @return the cost associated with running this Cloudlet or <tt>0.0</tt> if
* not found
* @pre resId >= 0
* @post $result >= 0.0
*/
......@@ -1138,13 +1237,13 @@ public class Cloudlet {
}
/**
* Gets the length of this Cloudlet that has been executed so far in a given CloudResource ID.
* This method is useful when trying to move this Cloudlet into different CloudResources or to
* cancel it.
* Gets the length of this Cloudlet that has been executed so far in a given
* CloudResource ID. This method is useful when trying to move this Cloudlet
* into different CloudResources or to cancel it.
*
* @param resId a CloudResource entity ID
* @return the length of a partially executed Cloudlet or the full Cloudlet length if it is
* completed or <tt>0.0</tt> if not found
* @return the length of a partially executed Cloudlet or the full Cloudlet
* length if it is completed or <tt>0.0</tt> if not found
* @pre resId >= 0
* @post $result >= 0.0
*/
......@@ -1157,7 +1256,8 @@ public class Cloudlet {
}
/**
* Gets the submission (arrival) time of this Cloudlet in the given CloudResource ID.
* Gets the submission (arrival) time of this Cloudlet in the given
* CloudResource ID.
*
* @param resId a CloudResource entity ID
* @return the submission time or <tt>0.0</tt> if not found
......@@ -1173,11 +1273,12 @@ public class Cloudlet {
}
/**
* Gets the time of this Cloudlet resides in a given CloudResource ID (from arrival time until
* departure time).
* Gets the time of this Cloudlet resides in a given CloudResource ID (from
* arrival time until departure time).
*
* @param resId a CloudResource entity ID
* @return the time of this Cloudlet resides in the CloudResource or <tt>0.0</tt> if not found
* @return the time of this Cloudlet resides in the CloudResource or
* <tt>0.0</tt> if not found
* @pre resId >= 0
* @post $result >= 0.0
*/
......@@ -1223,7 +1324,8 @@ public class Cloudlet {
/**
* Gets the finish time of this Cloudlet in a CloudResource.
*
* @return the finish or completion time of this Cloudlet or <tt>-1</tt> if not finished yet.
* @return the finish or completion time of this Cloudlet or <tt>-1</tt> if
* not finished yet.
* @pre $none
* @post $result >= -1
*/
......@@ -1232,7 +1334,6 @@ public class Cloudlet {
}
// //////////////////////// PROTECTED METHODS //////////////////////////////
/**
* Writes this particular history transaction of this Cloudlet into a log.
*
......@@ -1322,9 +1423,10 @@ public class Cloudlet {
}
/**
* Sets the resource parameters for which this Cloudlet is going to be executed. <br>
* NOTE: This method <tt>should</tt> be called only by a resource entity, not the user or owner
* of this Cloudlet.
* Sets the resource parameters for which this Cloudlet is going to be
* executed. <br>
* NOTE: This method <tt>should</tt> be called only by a resource entity,
* not the user or owner of this Cloudlet.
*
* @param resourceID the CloudResource ID
* @param costPerCPU the cost per second of running this Cloudlet
......@@ -1342,7 +1444,8 @@ public class Cloudlet {
/**
* Gets the total cost of processing or executing this Cloudlet
* <tt>Processing Cost = input data transfer + processing cost + output transfer cost</tt> .
* <tt>Processing Cost = input data transfer + processing cost + output
* transfer cost</tt> .
*
* @return the total cost of processing Cloudlet
* @pre $none
......@@ -1360,7 +1463,6 @@ public class Cloudlet {
}
// Data cloudlet
/**
* Gets the required files.
*
......
......@@ -392,11 +392,12 @@ public class CloudletSchedulerSpaceShared extends CloudletScheduler {
}
/**
* Returns the first cloudlet to migrate to another vm.
* Returns the first cloudlet to migrate to another VM.
*
* @return the first running cloudlet
* @pre $none
* @post $none
*
* @todo it doesn't check if the list is empty
*/
@Override
......
......@@ -122,14 +122,6 @@ public class Datacenter extends SimEntity {
// empty. This should be override by a child class
}
/**
* Processes events or services that are available for this Datacenter.
*
* @param ev information about the event just happened
*
* @pre ev != null
* @post $none
*/
@Override
public void processEvent(SimEvent ev) {
int srcId = -1;
......
......@@ -146,13 +146,6 @@ public class DatacenterBroker extends SimEntity {
CloudletList.getById(getCloudletList(), cloudletId).setVmId(vmId);
}
/**
* Processes events available for this Broker.
*
* @param ev a SimEvent object
* @pre ev != null
* @post $none
*/
@Override
public void processEvent(SimEvent ev) {
switch (ev.getTag()) {
......
......@@ -111,21 +111,11 @@ public class HarddriveStorage implements Storage {
maxTransferRate = 133; // in MB/sec
}
/**
* Gets the available space on this storage in MB.
*
* @return the available space in MB
*/
@Override
public double getAvailableSpace() {
return capacity - currentSize;
}
/**
* Checks if the storage is full or not.
*
* @return <tt>true</tt> if the storage is full, <tt>false</tt> otherwise
*/
@Override
public boolean isFull() {
if (Math.abs(currentSize - capacity) < .0000001) { // currentSize == capacity
......@@ -134,22 +124,11 @@ public class HarddriveStorage implements Storage {
return false;
}
/**
* Gets the number of files stored on this hard drive.
*
* @return the number of stored files
*/
@Override
public int getNumStoredFile() {
return fileList.size();
}
/**
* Reserves space on the hard drive to store a file.
*
* @param fileSize the size to be reserved in MB
* @return <tt>true</tt> if reservation succeeded, <tt>false</tt> otherwise
*/
@Override
public boolean reserveSpace(int fileSize) {
if (fileSize <= 0) {
......@@ -164,13 +143,6 @@ public class HarddriveStorage implements Storage {
return true;
}
/**
* Adds a file for which the space has already been reserved. The time taken (in seconds) for
* adding the file can also be found using {@link gridsim.datagrid.File#getTransactionTime()}.
*
* @param file the file to be added
* @return the time (in seconds) required to add the file
*/
@Override
public double addReservedFile(File file) {
if (file == null) {
......@@ -188,12 +160,6 @@ public class HarddriveStorage implements Storage {
return result;
}
/**
* Checks whether there is enough space on the hard drive for a certain file.
*
* @param fileSize a FileAttribute object to compare to
* @return <tt>true</tt> if enough space available, <tt>false</tt> otherwise
*/
@Override
public boolean hasPotentialAvailableSpace(int fileSize) {
if (fileSize <= 0) {
......@@ -227,31 +193,16 @@ public class HarddriveStorage implements Storage {
return result;
}
/**
* Gets the total capacity of the storage in MB.
*
* @return the capacity of the storage in MB
*/
@Override
public double getCapacity() {
return capacity;
}
/**
* Gets the current size of the stored files in MB.
*
* @return the current size of the stored files in MB
*/
@Override
public double getCurrentSize() {
return currentSize;
}
/**
* Gets the name of the storage.
*
* @return the name of this storage
*/
@Override
public String getName() {
return name;
......@@ -281,12 +232,6 @@ public class HarddriveStorage implements Storage {
return latency;
}
/**
* Sets the maximum transfer rate of this storage system in MB/sec.
*
* @param rate the maximum transfer rate in MB/sec
* @return <tt>true</tt> if the setting succeeded, <tt>false</tt> otherwise
*/
@Override
public boolean setMaxTransferRate(int rate) {
if (rate <= 0) {
......@@ -297,11 +242,6 @@ public class HarddriveStorage implements Storage {
return true;
}
/**
* Gets the maximum transfer rate of the storage in MB/sec.
*
* @return the maximum transfer rate in MB/sec
*/
@Override
public double getMaxTransferRate() {
return maxTransferRate;
......@@ -344,13 +284,6 @@ public class HarddriveStorage implements Storage {
return avgSeekTime;
}
/**
* Gets the file with the specified name. The time taken (in seconds) for getting the file can
* also be found using {@link gridsim.datagrid.File#getTransactionTime()}.
*
* @param fileName the name of the needed file
* @return the file with the specified filename
*/
@Override
public File getFile(String fileName) {
// check first whether file name is valid or not
......@@ -392,11 +325,6 @@ public class HarddriveStorage implements Storage {
return obj;
}
/**
* Gets the list of file names located on this storage.
*
* @return a List of file names
*/
@Override
public List<String> getFileNameList() {
return nameList;
......@@ -464,13 +392,13 @@ public class HarddriveStorage implements Storage {
}
/**
* Adds a file to the storage. First, the method checks if there is enough space on the storage,
* then it checks if the file with the same name is already taken to avoid duplicate filenames. <br>
* The time taken (in seconds) for adding the file can also be found using
* {@link gridsim.datagrid.File#getTransactionTime()}.
* {@inheritDoc}
*
* <p/>First, the method checks if there is enough space on the storage,
* then it checks if the file with the same name is already taken to avoid duplicate filenames.
*
* @param file the file to be added
* @return the time taken (in seconds) for adding the specified file
* @param file {@inheritDoc}
* @return {@inheritDoc}
*/
@Override
public double addFile(File file) {
......@@ -500,14 +428,6 @@ public class HarddriveStorage implements Storage {
return result;
}
/**
* Adds a set of files to the storage. Runs through the list of files and save all of them. The
* time taken (in seconds) for adding each file can also be found using
* {@link gridsim.datagrid.File#getTransactionTime()}.
*
* @param list the files to be added
* @return the time taken (in seconds) for adding the specified files
*/
@Override
public double addFile(List<File> list) {
double result = 0.0;
......@@ -525,13 +445,6 @@ public class HarddriveStorage implements Storage {
return result;
}
/**
* Removes a file from the storage. The time taken (in seconds) for deleting the file can also
* be found using {@link gridsim.datagrid.File#getTransactionTime()}.
*
* @param fileName the name of the file to be removed
* @return the deleted file
*/
@Override
public File deleteFile(String fileName) {
if (fileName == null || fileName.length() == 0) {
......@@ -556,26 +469,11 @@ public class HarddriveStorage implements Storage {
return file;
}
/**
* Removes a file from the storage. The time taken (in seconds) for deleting the file can also
* be found using {@link gridsim.datagrid.File#getTransactionTime()}.
*
* @param fileName the name of the file to be removed
* @param file the file which is removed from the storage is returned through this parameter
* @return the time taken (in seconds) for deleting the specified file
*/
@Override
public double deleteFile(String fileName, File file) {
return deleteFile(file);
}
/**
* Removes a file from the storage. The time taken (in seconds) for deleting the file can also
* be found using {@link gridsim.datagrid.File#getTransactionTime()}.
*
* @param file the file which is removed from the storage is returned through this parameter
* @return the time taken (in seconds) for deleting the specified file
*/
@Override
public double deleteFile(File file) {
double result = 0.0;
......@@ -597,12 +495,6 @@ public class HarddriveStorage implements Storage {
return result;
}
/**
* Checks whether a certain file is on the storage or not.
*
* @param fileName the name of the file we are looking for
* @return <tt>true</tt> if the file is in the storage, <tt>false</tt> otherwise
*/
@Override
public boolean contains(String fileName) {
boolean result = false;
......@@ -622,12 +514,6 @@ public class HarddriveStorage implements Storage {
return result;
}
/**
* Checks whether a certain file is on the storage or not.
*
* @param file the file we are looking for
* @return <tt>true</tt> if the file is in the storage, <tt>false</tt> otherwise
*/
@Override
public boolean contains(File file) {
boolean result = false;
......@@ -639,14 +525,6 @@ public class HarddriveStorage implements Storage {
return result;
}
/**
* Renames a file on the storage. The time taken (in seconds) for renaming the file can also be
* found using {@link gridsim.datagrid.File#getTransactionTime()}.
*
* @param file the file we would like to rename
* @param newName the new name of the file
* @return <tt>true</tt> if the renaming succeeded, <tt>false</tt> otherwise
*/
@Override
public boolean renameFile(File file, String newName) {
// check whether the new filename is conflicting with existing ones
......
......@@ -55,13 +55,6 @@ public class ParameterException extends Exception {
this.message = message;
}
/**
* Returns an error message of this object.
*
* @return an error message
* @pre $none
* @post $none
*/
@Override
public String toString() {
return message;
......
......@@ -60,12 +60,6 @@ public class SanStorage extends HarddriveStorage {
this.networkLatency = networkLatency;
}
/**
* Adds a file for which the space has already been reserved.
*
* @param file the file to be added
* @return the time (in seconds) required to add the file
*/
@Override
public double addReservedFile(File file) {
double time = super.addReservedFile(file);
......@@ -75,11 +69,6 @@ public class SanStorage extends HarddriveStorage {
return time;
}
/**
* Gets the maximum transfer rate of the storage in MB/sec.
*
* @return the maximum transfer rate in MB/sec
*/
@Override
public double getMaxTransferRate() {
......@@ -93,12 +82,6 @@ public class SanStorage extends HarddriveStorage {
return bandwidth;
}
/**
* Adds a file to the storage.
*
* @param file the file to be added
* @return the time taken (in seconds) for adding the specified file
*/
@Override
public double addFile(File file) {
double time = super.addFile(file);
......@@ -109,14 +92,6 @@ public class SanStorage extends HarddriveStorage {
return time;
}
/**
* Adds a set of files to the storage. Runs through the list of files and save all of them. The
* time taken (in seconds) for adding each file can also be found using
* {@link gridsim.datagrid.File#getTransactionTime()}.
*
* @param list the files to be added
* @return the time taken (in seconds) for adding the specified files
*/
@Override
public double addFile(List<File> list) {
double result = 0.0;
......@@ -134,26 +109,11 @@ public class SanStorage extends HarddriveStorage {
return result;
}
/**
* Removes a file from the storage. The time taken (in seconds) for deleting the file can also
* be found using {@link gridsim.datagrid.File#getTransactionTime()}.
*
* @param fileName the name of the file to be removed
* @param file the file which is removed from the storage is returned through this parameter
* @return the time taken (in seconds) for deleting the specified file
*/
@Override
public double deleteFile(String fileName, File file) {
return this.deleteFile(file);
}
/**
* Removes a file from the storage. The time taken (in seconds) for deleting the file can also
* be found using {@link gridsim.datagrid.File#getTransactionTime()}.
*
* @param file the file which is removed from the storage is returned through this parameter
* @return the time taken (in seconds) for deleting the specified file
*/
@Override
public double deleteFile(File file) {
double time = super.deleteFile(file);
......
......@@ -91,7 +91,7 @@ public interface Storage {
/**
* Adds a file for which the space has already been reserved. The time taken (in seconds) for
* adding the specified file can also be found using
* {@link gridsim.datagrid.File#getTransactionTime()}.
* {@link org.cloudbus.cloudsim.File#getTransactionTime()}.
*
* @param file the file to be added
* @return the time (in seconds) required to add the file
......@@ -108,7 +108,7 @@ public interface Storage {
/**
* Gets the file with the specified name. The time taken (in seconds) for getting the specified
* file can also be found using {@link gridsim.datagrid.File#getTransactionTime()}.
* file can also be found using {@link org.cloudbus.cloudsim.File#getTransactionTime()}.
*
* @param fileName the name of the needed file
* @return the file with the specified filename
......@@ -124,7 +124,7 @@ public interface Storage {
/**
* Adds a file to the storage. The time taken (in seconds) for adding the specified file can
* also be found using {@link gridsim.datagrid.File#getTransactionTime()}.
* also be found using {@link org.cloudbus.cloudsim.File#getTransactionTime()}.
*
* @param file the file to be added
* @return the time taken (in seconds) for adding the specified file
......@@ -154,7 +154,7 @@ public interface Storage {
* can also be found using {@link gridsim.datagrid.File#getTransactionTime()}.
*
* @param fileName the name of the file to be removed
* @param file the file which is removed from the storage is returned through this parameter
* @param file the file removed from the storage is returned through this parameter
* @return the time taken (in seconds) for deleting the specified file
*/
double deleteFile(String fileName, File file);
......@@ -163,13 +163,13 @@ public interface Storage {
* Removes a file from the storage. The time taken (in seconds) for deleting the specified file
* can also be found using {@link gridsim.datagrid.File#getTransactionTime()}.
*
* @param file the file which is removed from the storage is returned through this parameter
* @param file the file to be removed
* @return the time taken (in seconds) for deleting the specified file
*/
double deleteFile(File file);
/**
* Checks whether a file is stored in the storage or not.
* Checks whether a file exists in the storage or not.
*
* @param fileName the name of the file we are looking for
* @return <tt>true</tt> if the file is in the storage, <tt>false</tt> otherwise
......@@ -186,7 +186,7 @@ public interface Storage {
/**
* Renames a file on the storage. The time taken (in seconds) for renaming the specified file
* can also be found using {@link gridsim.datagrid.File#getTransactionTime()}.
* can also be found using {@link org.cloudbus.cloudsim.File#getTransactionTime()}.
*
* @param file the file we would like to rename
* @param newName the new name of the file
......
......@@ -38,10 +38,9 @@ public abstract class VmAllocationPolicy {
}
/**
* Allocates a host for a given VM. The host to be allocated is the one that was already
* reserved.
* Allocates a host for a given VM.
*
* @param vm virtual machine which the host is reserved to
* @param vm the VM to allocate a host to
* @return $true if the host could be allocated; $false otherwise
* @pre $none
* @post $none
......@@ -76,7 +75,7 @@ public abstract class VmAllocationPolicy {
/**
* Releases the host used by a VM.
*
* @param vm the vm
* @param vm the vm to get its host released
* @pre $none
* @post $none
*/
......
......@@ -58,10 +58,10 @@ public class VmAllocationPolicySimple extends VmAllocationPolicy {
}
/**
* Allocates a host for a given VM.
* Allocates the host with less PEs in use for a given VM.
*
* @param vm the VM to allocate a host to
* @return $true if the host could be allocated; $false otherwise
* @param vm {@inheritDoc}
* @return {@inheritDoc}
* @pre $none
* @post $none
*/
......@@ -108,13 +108,6 @@ public class VmAllocationPolicySimple extends VmAllocationPolicy {
return result;
}
/**
* Releases the host used by a VM.
*
* @param vm the vm to get its host released
* @pre $none
* @post none
*/
@Override
public void deallocateHostForVm(Vm vm) {
Host host = getVmTable().remove(vm.getUid());
......
......@@ -76,12 +76,6 @@ public class CloudInformationService extends SimEntity {
public void startEntity() {
}
/**
* Processes events scheduled for the CIS.
*
* @param ev the event to be handled.
* @see SimEntity#processEvent(SimEvent)
*/
@Override
public void processEvent(SimEvent ev) {
int id = -1; // requester id
......@@ -138,9 +132,6 @@ public class CloudInformationService extends SimEntity {
}
}
/**
* Shutdowns the CloudInformationService.
*/
@Override
public void shutdownEntity() {
notifyAllEntity();
......
......@@ -89,5 +89,4 @@ public class CloudSimShutdown extends SimEntity {
public void shutdownEntity() {
// do nothing
}
}
......@@ -394,14 +394,19 @@ public abstract class SimEntity implements Cloneable {
public abstract void startEntity();
/**
* Processes events or services that are available for the entity.
* This method is invoked by the {@link CloudSim} class whenever there is an event in the
* deferred queue, which needs to be processed by the entity.
*
* @param ev the event to be processed by the entity
* @param ev information about the event just happened
*
* @pre ev != null
* @post $none
*/
public abstract void processEvent(SimEvent ev);
/**
* Shuts down the entity.
* This method is invoked by the {@link CloudSim} before the simulation finishes. If you want
* to save data in log files this is the method in which the corresponding code would be placed.
*/
......
......@@ -215,11 +215,6 @@ public class SimEvent implements Cloneable, Comparable<SimEvent> {
return data;
}
/**
* Create an exact copy of this event.
*
* @return The event's copy
*/
@Override
public Object clone() {
return new SimEvent(etype, time, entSrc, entDst, tag, data);
......
......@@ -29,7 +29,7 @@ public class PredicateAny extends Predicate {
* Considers there is no criteria to match an event,
* so any event received by the predicate will match.
*
* @param ev the event received
* @param ev {@inheritDoc}
* @return always true to indicate that any received event is accepted
*/
@Override
......
......@@ -45,8 +45,8 @@ public class PredicateFrom extends Predicate {
/**
* Matches any event received from the registered sources.
*
* @param ev the event to check
* @return <code>true</code> if the event matches the predicate, <code>false</code> otherwise
* @param ev {@inheritDoc}
* @return {@inheritDoc}
* @see #ids
*/
@Override
......
......@@ -26,12 +26,11 @@ public class PredicateNone extends Predicate {
/**
* Considers that no event received by the predicate matches.
*
* @param ev the event received
* @param ev {@inheritDoc}
* @return always false to indicate that no event is accepted
*/
@Override
public boolean match(SimEvent ev) {
return false;
}
}
......@@ -44,8 +44,8 @@ public class PredicateNotFrom extends Predicate {
/**
* Matches any event <b>not</b> received from the registered sources.
*
* @param ev the event to check
* @return <code>true</code> if the event matches the predicate, <code>false</code> otherwise
* @param ev {@inheritDoc}
* @return {@inheritDoc}
* @see #ids
*/
@Override
......
......@@ -44,8 +44,8 @@ public class PredicateNotType extends Predicate {
/**
* Matches any event that hasn't one of the specified {@link #tags}.
*
* @param ev the event to check
* @return <code>true</code> if the event matches the predicate, <code>false</code> otherwise
* @param ev {@inheritDoc}
* @return {@inheritDoc}
* @see #tags
*/
@Override
......
......@@ -44,8 +44,8 @@ public class PredicateType extends Predicate {
/**
* Matches any event that has one of the specified {@link #tags}.
*
* @param ev the event to check
* @return <code>true</code> if the event matches the predicate, <code>false</code> otherwise
* @param ev {@inheritDoc}
* @return {@inheritDoc}
* @see #tags
*/
@Override
......
......@@ -67,13 +67,13 @@ public class CloudletList {
Collections.sort(cloudletList, new Comparator<T>() {
/**
* Compares two objects.
* Compares two Cloudlets.
*
* @param a the first Object to be compared
* @param b the second Object to be compared
* @return the value 0 if both Objects are numerically equal; a value less than 0 if the
* first Object is numerically less than the second Object; and a value greater
* than 0 if the first Object is numerically greater than the second Object.
* @param a the first Cloudlet to be compared
* @param b the second Cloudlet to be compared
* @return the value 0 if both Cloudlets are numerically equal; a value less than 0 if the
* first Object is numerically less than the second Cloudlet; and a value greater
* than 0 if the first Cloudlet is numerically greater than the second Cloudlet.
* @throws ClassCastException <tt>a</tt> and <tt>b</tt> are expected to be of type
* <tt>Cloudlet</tt>
* @pre a != null
......
......@@ -20,8 +20,8 @@ import org.cloudbus.cloudsim.VmAllocationPolicy;
import org.cloudbus.cloudsim.core.CloudSim;
/**
* NetworkVmAllocationPolicy is an {@link VmAllocationPolicy} that chooses, as the host for a VM, the host
* with less PEs in use.
* NetworkVmAllocationPolicy is an {@link VmAllocationPolicy} that chooses,
* as the host for a VM, the host with less PEs in use.
*
* @author Rodrigo N. Calheiros
* @author Anton Beloglazov
......@@ -63,11 +63,11 @@ public class NetworkVmAllocationPolicy extends VmAllocationPolicy {
}
/**
* Allocates a host for a given VM.
* Allocates the host with less PEs in use for a given VM.
*
* @param vm VM specification
* @param vm {@inheritDoc}
*
* @return $true if the host could be allocated; $false otherwise
* @return {@inheritDoc}
*
* @pre $none
* @post $none
......@@ -145,14 +145,6 @@ public class NetworkVmAllocationPolicy extends VmAllocationPolicy {
return maxUtilization;
}
/**
* Releases the host used by a VM.
*
* @param vm the vm
*
* @pre $none
* @post none
*/
@Override
public void deallocateHostForVm(Vm vm) {
Host host = getVmTable().remove(vm.getUid());
......@@ -164,32 +156,11 @@ public class NetworkVmAllocationPolicy extends VmAllocationPolicy {
}
}
/**
* Gets the host that is executing the given VM.
*
* @param vm the vm to get its host
*
* @return the Host of the given vm; $null if not found
*
* @pre $none
* @post $none
*/
@Override
public Host getHost(Vm vm) {
return getVmTable().get(vm.getUid());
}
/**
* Gets the host that is executing the given VM belonging to the given user.
*
* @param vmId the vm id
* @param userId the user id
*
* @return the Host of the given vm and user; $null if not found
*
* @pre $none
* @post $none
*/
@Override
public Host getHost(int vmId, int userId) {
return getVmTable().get(Vm.getUid(userId, vmId));
......
......@@ -15,8 +15,7 @@ import org.cloudbus.cloudsim.Host;
import org.cloudbus.cloudsim.Vm;
/**
* A class representing a simple VM allocation policy that does not perform any
* optimization of the VM allocation.
* A simple VM allocation policy that does <b>not</b> perform any optimization on VM allocation.
*
* <br/>If you are using any algorithms, policies or workload included in the power package please cite
* the following paper:<br/>
......
......@@ -25,9 +25,10 @@ import org.cloudbus.cloudsim.Cloudlet;
public interface WorkloadModel {
/**
* Generates a list of jobs to be executed ({@link Cloudlet Cloudlets}).
* Generates a list of jobs ({@link Cloudlet Cloudlets}) to be executed.
*
* @return a list with the jobs generated by the workload or null in case of failure.
* @return a list with the jobs ({@link Cloudlet Cloudlets})
* generated by the workload or null in case of failure.
*/
List<Cloudlet> generateWorkload();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment