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
...@@ -392,11 +392,12 @@ public class CloudletSchedulerSpaceShared extends CloudletScheduler { ...@@ -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 * @return the first running cloudlet
* @pre $none * @pre $none
* @post $none * @post $none
*
* @todo it doesn't check if the list is empty * @todo it doesn't check if the list is empty
*/ */
@Override @Override
......
...@@ -122,14 +122,6 @@ public class Datacenter extends SimEntity { ...@@ -122,14 +122,6 @@ public class Datacenter extends SimEntity {
// empty. This should be override by a child class // 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 @Override
public void processEvent(SimEvent ev) { public void processEvent(SimEvent ev) {
int srcId = -1; int srcId = -1;
......
...@@ -146,13 +146,6 @@ public class DatacenterBroker extends SimEntity { ...@@ -146,13 +146,6 @@ public class DatacenterBroker extends SimEntity {
CloudletList.getById(getCloudletList(), cloudletId).setVmId(vmId); CloudletList.getById(getCloudletList(), cloudletId).setVmId(vmId);
} }
/**
* Processes events available for this Broker.
*
* @param ev a SimEvent object
* @pre ev != null
* @post $none
*/
@Override @Override
public void processEvent(SimEvent ev) { public void processEvent(SimEvent ev) {
switch (ev.getTag()) { switch (ev.getTag()) {
......
...@@ -111,21 +111,11 @@ public class HarddriveStorage implements Storage { ...@@ -111,21 +111,11 @@ public class HarddriveStorage implements Storage {
maxTransferRate = 133; // in MB/sec maxTransferRate = 133; // in MB/sec
} }
/**
* Gets the available space on this storage in MB.
*
* @return the available space in MB
*/
@Override @Override
public double getAvailableSpace() { public double getAvailableSpace() {
return capacity - currentSize; 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 @Override
public boolean isFull() { public boolean isFull() {
if (Math.abs(currentSize - capacity) < .0000001) { // currentSize == capacity if (Math.abs(currentSize - capacity) < .0000001) { // currentSize == capacity
...@@ -134,22 +124,11 @@ public class HarddriveStorage implements Storage { ...@@ -134,22 +124,11 @@ public class HarddriveStorage implements Storage {
return false; return false;
} }
/**
* Gets the number of files stored on this hard drive.
*
* @return the number of stored files
*/
@Override @Override
public int getNumStoredFile() { public int getNumStoredFile() {
return fileList.size(); 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 @Override
public boolean reserveSpace(int fileSize) { public boolean reserveSpace(int fileSize) {
if (fileSize <= 0) { if (fileSize <= 0) {
...@@ -164,13 +143,6 @@ public class HarddriveStorage implements Storage { ...@@ -164,13 +143,6 @@ public class HarddriveStorage implements Storage {
return true; 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 @Override
public double addReservedFile(File file) { public double addReservedFile(File file) {
if (file == null) { if (file == null) {
...@@ -188,12 +160,6 @@ public class HarddriveStorage implements Storage { ...@@ -188,12 +160,6 @@ public class HarddriveStorage implements Storage {
return result; 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 @Override
public boolean hasPotentialAvailableSpace(int fileSize) { public boolean hasPotentialAvailableSpace(int fileSize) {
if (fileSize <= 0) { if (fileSize <= 0) {
...@@ -227,31 +193,16 @@ public class HarddriveStorage implements Storage { ...@@ -227,31 +193,16 @@ public class HarddriveStorage implements Storage {
return result; return result;
} }
/**
* Gets the total capacity of the storage in MB.
*
* @return the capacity of the storage in MB
*/
@Override @Override
public double getCapacity() { public double getCapacity() {
return capacity; return capacity;
} }
/**
* Gets the current size of the stored files in MB.
*
* @return the current size of the stored files in MB
*/
@Override @Override
public double getCurrentSize() { public double getCurrentSize() {
return currentSize; return currentSize;
} }
/**
* Gets the name of the storage.
*
* @return the name of this storage
*/
@Override @Override
public String getName() { public String getName() {
return name; return name;
...@@ -281,12 +232,6 @@ public class HarddriveStorage implements Storage { ...@@ -281,12 +232,6 @@ public class HarddriveStorage implements Storage {
return latency; 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 @Override
public boolean setMaxTransferRate(int rate) { public boolean setMaxTransferRate(int rate) {
if (rate <= 0) { if (rate <= 0) {
...@@ -297,11 +242,6 @@ public class HarddriveStorage implements Storage { ...@@ -297,11 +242,6 @@ public class HarddriveStorage implements Storage {
return true; return true;
} }
/**
* Gets the maximum transfer rate of the storage in MB/sec.
*
* @return the maximum transfer rate in MB/sec
*/
@Override @Override
public double getMaxTransferRate() { public double getMaxTransferRate() {
return maxTransferRate; return maxTransferRate;
...@@ -344,13 +284,6 @@ public class HarddriveStorage implements Storage { ...@@ -344,13 +284,6 @@ public class HarddriveStorage implements Storage {
return avgSeekTime; 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 @Override
public File getFile(String fileName) { public File getFile(String fileName) {
// check first whether file name is valid or not // check first whether file name is valid or not
...@@ -392,11 +325,6 @@ public class HarddriveStorage implements Storage { ...@@ -392,11 +325,6 @@ public class HarddriveStorage implements Storage {
return obj; return obj;
} }
/**
* Gets the list of file names located on this storage.
*
* @return a List of file names
*/
@Override @Override
public List<String> getFileNameList() { public List<String> getFileNameList() {
return nameList; return nameList;
...@@ -464,13 +392,13 @@ public class HarddriveStorage implements Storage { ...@@ -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, * {@inheritDoc}
* 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 * <p/>First, the method checks if there is enough space on the storage,
* {@link gridsim.datagrid.File#getTransactionTime()}. * then it checks if the file with the same name is already taken to avoid duplicate filenames.
* *
* @param file the file to be added * @param file {@inheritDoc}
* @return the time taken (in seconds) for adding the specified file * @return {@inheritDoc}
*/ */
@Override @Override
public double addFile(File file) { public double addFile(File file) {
...@@ -500,14 +428,6 @@ public class HarddriveStorage implements Storage { ...@@ -500,14 +428,6 @@ public class HarddriveStorage implements Storage {
return result; 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 @Override
public double addFile(List<File> list) { public double addFile(List<File> list) {
double result = 0.0; double result = 0.0;
...@@ -525,13 +445,6 @@ public class HarddriveStorage implements Storage { ...@@ -525,13 +445,6 @@ public class HarddriveStorage implements Storage {
return result; 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 @Override
public File deleteFile(String fileName) { public File deleteFile(String fileName) {
if (fileName == null || fileName.length() == 0) { if (fileName == null || fileName.length() == 0) {
...@@ -556,26 +469,11 @@ public class HarddriveStorage implements Storage { ...@@ -556,26 +469,11 @@ public class HarddriveStorage implements Storage {
return file; 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 @Override
public double deleteFile(String fileName, File file) { public double deleteFile(String fileName, File file) {
return deleteFile(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 @Override
public double deleteFile(File file) { public double deleteFile(File file) {
double result = 0.0; double result = 0.0;
...@@ -597,12 +495,6 @@ public class HarddriveStorage implements Storage { ...@@ -597,12 +495,6 @@ public class HarddriveStorage implements Storage {
return result; 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 @Override
public boolean contains(String fileName) { public boolean contains(String fileName) {
boolean result = false; boolean result = false;
...@@ -622,12 +514,6 @@ public class HarddriveStorage implements Storage { ...@@ -622,12 +514,6 @@ public class HarddriveStorage implements Storage {
return result; 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 @Override
public boolean contains(File file) { public boolean contains(File file) {
boolean result = false; boolean result = false;
...@@ -639,14 +525,6 @@ public class HarddriveStorage implements Storage { ...@@ -639,14 +525,6 @@ public class HarddriveStorage implements Storage {
return result; 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 @Override
public boolean renameFile(File file, String newName) { public boolean renameFile(File file, String newName) {
// check whether the new filename is conflicting with existing ones // check whether the new filename is conflicting with existing ones
......
...@@ -55,13 +55,6 @@ public class ParameterException extends Exception { ...@@ -55,13 +55,6 @@ public class ParameterException extends Exception {
this.message = message; this.message = message;
} }
/**
* Returns an error message of this object.
*
* @return an error message
* @pre $none
* @post $none
*/
@Override @Override
public String toString() { public String toString() {
return message; return message;
......
...@@ -60,12 +60,6 @@ public class SanStorage extends HarddriveStorage { ...@@ -60,12 +60,6 @@ public class SanStorage extends HarddriveStorage {
this.networkLatency = networkLatency; 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 @Override
public double addReservedFile(File file) { public double addReservedFile(File file) {
double time = super.addReservedFile(file); double time = super.addReservedFile(file);
...@@ -75,11 +69,6 @@ public class SanStorage extends HarddriveStorage { ...@@ -75,11 +69,6 @@ public class SanStorage extends HarddriveStorage {
return time; return time;
} }
/**
* Gets the maximum transfer rate of the storage in MB/sec.
*
* @return the maximum transfer rate in MB/sec
*/
@Override @Override
public double getMaxTransferRate() { public double getMaxTransferRate() {
...@@ -93,12 +82,6 @@ public class SanStorage extends HarddriveStorage { ...@@ -93,12 +82,6 @@ public class SanStorage extends HarddriveStorage {
return bandwidth; 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 @Override
public double addFile(File file) { public double addFile(File file) {
double time = super.addFile(file); double time = super.addFile(file);
...@@ -109,14 +92,6 @@ public class SanStorage extends HarddriveStorage { ...@@ -109,14 +92,6 @@ public class SanStorage extends HarddriveStorage {
return time; 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 @Override
public double addFile(List<File> list) { public double addFile(List<File> list) {
double result = 0.0; double result = 0.0;
...@@ -134,26 +109,11 @@ public class SanStorage extends HarddriveStorage { ...@@ -134,26 +109,11 @@ public class SanStorage extends HarddriveStorage {
return result; 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 @Override
public double deleteFile(String fileName, File file) { public double deleteFile(String fileName, File file) {
return this.deleteFile(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 @Override
public double deleteFile(File file) { public double deleteFile(File file) {
double time = super.deleteFile(file); double time = super.deleteFile(file);
......
...@@ -91,7 +91,7 @@ public interface Storage { ...@@ -91,7 +91,7 @@ public interface Storage {
/** /**
* Adds a file for which the space has already been reserved. The time taken (in seconds) for * 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 * 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 * @param file the file to be added
* @return the time (in seconds) required to add the file * @return the time (in seconds) required to add the file
...@@ -108,7 +108,7 @@ public interface Storage { ...@@ -108,7 +108,7 @@ public interface Storage {
/** /**
* Gets the file with the specified name. The time taken (in seconds) for getting the specified * 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 * @param fileName the name of the needed file
* @return the file with the specified filename * @return the file with the specified filename
...@@ -124,7 +124,7 @@ public interface Storage { ...@@ -124,7 +124,7 @@ public interface Storage {
/** /**
* Adds a file to the storage. The time taken (in seconds) for adding the specified file can * 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 * @param file the file to be added
* @return the time taken (in seconds) for adding the specified file * @return the time taken (in seconds) for adding the specified file
...@@ -154,7 +154,7 @@ public interface Storage { ...@@ -154,7 +154,7 @@ public interface Storage {
* can also be found using {@link gridsim.datagrid.File#getTransactionTime()}. * can also be found using {@link gridsim.datagrid.File#getTransactionTime()}.
* *
* @param fileName the name of the file to be removed * @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 * @return the time taken (in seconds) for deleting the specified file
*/ */
double deleteFile(String fileName, File file); double deleteFile(String fileName, File file);
...@@ -163,13 +163,13 @@ public interface Storage { ...@@ -163,13 +163,13 @@ public interface Storage {
* Removes a file from the storage. The time taken (in seconds) for deleting the specified file * 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()}. * 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 * @return the time taken (in seconds) for deleting the specified file
*/ */
double deleteFile(File 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 * @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 * @return <tt>true</tt> if the file is in the storage, <tt>false</tt> otherwise
...@@ -186,7 +186,7 @@ public interface Storage { ...@@ -186,7 +186,7 @@ public interface Storage {
/** /**
* Renames a file on the storage. The time taken (in seconds) for renaming the specified file * 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 file the file we would like to rename
* @param newName the new name of the file * @param newName the new name of the file
......
...@@ -38,10 +38,9 @@ public abstract class VmAllocationPolicy { ...@@ -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 * Allocates a host for a given VM.
* reserved.
* *
* @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 * @return $true if the host could be allocated; $false otherwise
* @pre $none * @pre $none
* @post $none * @post $none
...@@ -76,7 +75,7 @@ public abstract class VmAllocationPolicy { ...@@ -76,7 +75,7 @@ public abstract class VmAllocationPolicy {
/** /**
* Releases the host used by a VM. * Releases the host used by a VM.
* *
* @param vm the vm * @param vm the vm to get its host released
* @pre $none * @pre $none
* @post $none * @post $none
*/ */
......
...@@ -58,10 +58,10 @@ public class VmAllocationPolicySimple extends VmAllocationPolicy { ...@@ -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 * @param vm {@inheritDoc}
* @return $true if the host could be allocated; $false otherwise * @return {@inheritDoc}
* @pre $none * @pre $none
* @post $none * @post $none
*/ */
...@@ -108,13 +108,6 @@ public class VmAllocationPolicySimple extends VmAllocationPolicy { ...@@ -108,13 +108,6 @@ public class VmAllocationPolicySimple extends VmAllocationPolicy {
return result; return result;
} }
/**
* Releases the host used by a VM.
*
* @param vm the vm to get its host released
* @pre $none
* @post none
*/
@Override @Override
public void deallocateHostForVm(Vm vm) { public void deallocateHostForVm(Vm vm) {
Host host = getVmTable().remove(vm.getUid()); Host host = getVmTable().remove(vm.getUid());
......
...@@ -76,12 +76,6 @@ public class CloudInformationService extends SimEntity { ...@@ -76,12 +76,6 @@ public class CloudInformationService extends SimEntity {
public void startEntity() { public void startEntity() {
} }
/**
* Processes events scheduled for the CIS.
*
* @param ev the event to be handled.
* @see SimEntity#processEvent(SimEvent)
*/
@Override @Override
public void processEvent(SimEvent ev) { public void processEvent(SimEvent ev) {
int id = -1; // requester id int id = -1; // requester id
...@@ -138,9 +132,6 @@ public class CloudInformationService extends SimEntity { ...@@ -138,9 +132,6 @@ public class CloudInformationService extends SimEntity {
} }
} }
/**
* Shutdowns the CloudInformationService.
*/
@Override @Override
public void shutdownEntity() { public void shutdownEntity() {
notifyAllEntity(); notifyAllEntity();
......
...@@ -81,7 +81,7 @@ public class CloudSimShutdown extends SimEntity { ...@@ -81,7 +81,7 @@ public class CloudSimShutdown extends SimEntity {
public void startEntity() { public void startEntity() {
// do nothing // do nothing
} }
/** /**
* The method has no effect at the current class. * The method has no effect at the current class.
*/ */
...@@ -89,5 +89,4 @@ public class CloudSimShutdown extends SimEntity { ...@@ -89,5 +89,4 @@ public class CloudSimShutdown extends SimEntity {
public void shutdownEntity() { public void shutdownEntity() {
// do nothing // do nothing
} }
} }
...@@ -394,14 +394,19 @@ public abstract class SimEntity implements Cloneable { ...@@ -394,14 +394,19 @@ public abstract class SimEntity implements Cloneable {
public abstract void startEntity(); 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 * 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. * 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); 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 * 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. * 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> { ...@@ -215,11 +215,6 @@ public class SimEvent implements Cloneable, Comparable<SimEvent> {
return data; return data;
} }
/**
* Create an exact copy of this event.
*
* @return The event's copy
*/
@Override @Override
public Object clone() { public Object clone() {
return new SimEvent(etype, time, entSrc, entDst, tag, data); return new SimEvent(etype, time, entSrc, entDst, tag, data);
......
...@@ -29,7 +29,7 @@ public class PredicateAny extends Predicate { ...@@ -29,7 +29,7 @@ public class PredicateAny extends Predicate {
* Considers there is no criteria to match an event, * Considers there is no criteria to match an event,
* so any event received by the predicate will match. * 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 * @return always true to indicate that any received event is accepted
*/ */
@Override @Override
......
...@@ -45,8 +45,8 @@ public class PredicateFrom extends Predicate { ...@@ -45,8 +45,8 @@ public class PredicateFrom extends Predicate {
/** /**
* Matches any event received from the registered sources. * Matches any event received from the registered sources.
* *
* @param ev the event to check * @param ev {@inheritDoc}
* @return <code>true</code> if the event matches the predicate, <code>false</code> otherwise * @return {@inheritDoc}
* @see #ids * @see #ids
*/ */
@Override @Override
......
...@@ -26,12 +26,11 @@ public class PredicateNone extends Predicate { ...@@ -26,12 +26,11 @@ public class PredicateNone extends Predicate {
/** /**
* Considers that no event received by the predicate matches. * 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 * @return always false to indicate that no event is accepted
*/ */
@Override @Override
public boolean match(SimEvent ev) { public boolean match(SimEvent ev) {
return false; return false;
} }
} }
...@@ -44,8 +44,8 @@ public class PredicateNotFrom extends Predicate { ...@@ -44,8 +44,8 @@ public class PredicateNotFrom extends Predicate {
/** /**
* Matches any event <b>not</b> received from the registered sources. * Matches any event <b>not</b> received from the registered sources.
* *
* @param ev the event to check * @param ev {@inheritDoc}
* @return <code>true</code> if the event matches the predicate, <code>false</code> otherwise * @return {@inheritDoc}
* @see #ids * @see #ids
*/ */
@Override @Override
......
...@@ -44,8 +44,8 @@ public class PredicateNotType extends Predicate { ...@@ -44,8 +44,8 @@ public class PredicateNotType extends Predicate {
/** /**
* Matches any event that hasn't one of the specified {@link #tags}. * Matches any event that hasn't one of the specified {@link #tags}.
* *
* @param ev the event to check * @param ev {@inheritDoc}
* @return <code>true</code> if the event matches the predicate, <code>false</code> otherwise * @return {@inheritDoc}
* @see #tags * @see #tags
*/ */
@Override @Override
......
...@@ -44,8 +44,8 @@ public class PredicateType extends Predicate { ...@@ -44,8 +44,8 @@ public class PredicateType extends Predicate {
/** /**
* Matches any event that has one of the specified {@link #tags}. * Matches any event that has one of the specified {@link #tags}.
* *
* @param ev the event to check * @param ev {@inheritDoc}
* @return <code>true</code> if the event matches the predicate, <code>false</code> otherwise * @return {@inheritDoc}
* @see #tags * @see #tags
*/ */
@Override @Override
......
...@@ -67,13 +67,13 @@ public class CloudletList { ...@@ -67,13 +67,13 @@ public class CloudletList {
Collections.sort(cloudletList, new Comparator<T>() { Collections.sort(cloudletList, new Comparator<T>() {
/** /**
* Compares two objects. * Compares two Cloudlets.
* *
* @param a the first Object to be compared * @param a the first Cloudlet to be compared
* @param b the second Object to be compared * @param b the second Cloudlet to be compared
* @return the value 0 if both Objects are numerically equal; a value less than 0 if the * @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 Object; and a value greater * first Object is numerically less than the second Cloudlet; and a value greater
* than 0 if the first Object is numerically greater than the second Object. * 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 * @throws ClassCastException <tt>a</tt> and <tt>b</tt> are expected to be of type
* <tt>Cloudlet</tt> * <tt>Cloudlet</tt>
* @pre a != null * @pre a != null
......
...@@ -20,8 +20,8 @@ import org.cloudbus.cloudsim.VmAllocationPolicy; ...@@ -20,8 +20,8 @@ import org.cloudbus.cloudsim.VmAllocationPolicy;
import org.cloudbus.cloudsim.core.CloudSim; import org.cloudbus.cloudsim.core.CloudSim;
/** /**
* NetworkVmAllocationPolicy is an {@link VmAllocationPolicy} that chooses, as the host for a VM, the host * NetworkVmAllocationPolicy is an {@link VmAllocationPolicy} that chooses,
* with less PEs in use. * as the host for a VM, the host with less PEs in use.
* *
* @author Rodrigo N. Calheiros * @author Rodrigo N. Calheiros
* @author Anton Beloglazov * @author Anton Beloglazov
...@@ -63,11 +63,11 @@ public class NetworkVmAllocationPolicy extends VmAllocationPolicy { ...@@ -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 * @pre $none
* @post $none * @post $none
...@@ -145,14 +145,6 @@ public class NetworkVmAllocationPolicy extends VmAllocationPolicy { ...@@ -145,14 +145,6 @@ public class NetworkVmAllocationPolicy extends VmAllocationPolicy {
return maxUtilization; return maxUtilization;
} }
/**
* Releases the host used by a VM.
*
* @param vm the vm
*
* @pre $none
* @post none
*/
@Override @Override
public void deallocateHostForVm(Vm vm) { public void deallocateHostForVm(Vm vm) {
Host host = getVmTable().remove(vm.getUid()); Host host = getVmTable().remove(vm.getUid());
...@@ -164,32 +156,11 @@ public class NetworkVmAllocationPolicy extends VmAllocationPolicy { ...@@ -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 @Override
public Host getHost(Vm vm) { public Host getHost(Vm vm) {
return getVmTable().get(vm.getUid()); 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 @Override
public Host getHost(int vmId, int userId) { public Host getHost(int vmId, int userId) {
return getVmTable().get(Vm.getUid(userId, vmId)); return getVmTable().get(Vm.getUid(userId, vmId));
......
...@@ -15,8 +15,7 @@ import org.cloudbus.cloudsim.Host; ...@@ -15,8 +15,7 @@ import org.cloudbus.cloudsim.Host;
import org.cloudbus.cloudsim.Vm; import org.cloudbus.cloudsim.Vm;
/** /**
* A class representing a simple VM allocation policy that does not perform any * A simple VM allocation policy that does <b>not</b> perform any optimization on VM allocation.
* optimization of the VM allocation.
* *
* <br/>If you are using any algorithms, policies or workload included in the power package please cite * <br/>If you are using any algorithms, policies or workload included in the power package please cite
* the following paper:<br/> * the following paper:<br/>
......
...@@ -25,9 +25,10 @@ import org.cloudbus.cloudsim.Cloudlet; ...@@ -25,9 +25,10 @@ import org.cloudbus.cloudsim.Cloudlet;
public interface WorkloadModel { 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(); 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