diff --git a/src/main/java/cloudreports/models/CloudletRegistry.java b/src/main/java/cloudreports/models/CloudletRegistry.java
index 8191fee..b57cc53 100755
--- a/src/main/java/cloudreports/models/CloudletRegistry.java
+++ b/src/main/java/cloudreports/models/CloudletRegistry.java
@@ -21,12 +21,10 @@
import java.io.Serializable;
-/**
- * Represents a list of cloudlets of a customer.
- *
- * @author Thiago T. Sá
- * @since 1.0
- */
+/// Represents a list of cloudlets of a customer.
+///
+/// @author Thiago T. Sá
+/// @since 1.0
public final class CloudletRegistry implements Serializable{
private long id;
private double timeZone;
@@ -44,201 +42,157 @@ public CloudletRegistry() {
amount = 1;
}
- /**
- * Gets the profile's id.
- *
- * @return the profile's id.
- */
+ /// Gets the profile's id.
+ ///
+ /// @return the profile's id.
public long getId() {
return id;
}
- /**
- * Sets the profile's id.
- *
- * @param id the profile's id.
- */
+ /// Sets the profile's id.
+ ///
+ /// @param id the profile's id.
public void setId(long id) {
this.id = id;
}
- /**
- * Gets the profile's time zone.
- *
- * @return the profile's time zone.
- */
+ /// Gets the profile's time zone.
+ ///
+ /// @return the profile's time zone.
public double getTimeZone() {
return timeZone;
}
- /**
- * Sets the profile's time zone.
- *
- * @param timeZone the profile's time zone.
- */
+ /// Sets the profile's time zone.
+ ///
+ /// @param timeZone the profile's time zone.
public void setTimeZone(double timeZone) {
this.timeZone = timeZone;
}
- /**
- * Gets the number of cloudlets.
- *
- * @return the number of cloudlets.
- */
+ /// Gets the number of cloudlets.
+ ///
+ /// @return the number of cloudlets.
public int getAmount() {
return amount;
}
- /**
- * Sets the number of cloudlets.
- *
- * @param amount the number of cloudlets.
- */
+ /// Sets the number of cloudlets.
+ ///
+ /// @param amount the number of cloudlets.
public void setAmount(int amount) {
this.amount = amount;
}
- /**
- * Gets the maximum length of a cloudlet.
- *
- * @return the maximum length of a cloudlet.
- */
+ /// Gets the maximum length of a cloudlet.
+ ///
+ /// @return the maximum length of a cloudlet.
public long getLength() {
return length;
}
- /**
- * Sets the maximum length of a cloudlet.
- *
- * @param length the maximum length of a cloudlet.
- */
+ /// Sets the maximum length of a cloudlet.
+ ///
+ /// @param length the maximum length of a cloudlet.
public void setLength(long length) {
this.length = length;
}
- /**
- * Gets the cloudlets' file size.
- *
- * @return the cloudlets' file size.
- */
+ /// Gets the cloudlets' file size.
+ ///
+ /// @return the cloudlets' file size.
public long getFileSize() {
return fileSize;
}
- /**
- * Sets the cloudlets' file size.
- *
- * @param fileSize the cloudlets' file size.
- */
+ /// Sets the cloudlets' file size.
+ ///
+ /// @param fileSize the cloudlets' file size.
public void setFileSize(long fileSize) {
this.fileSize = fileSize;
}
- /**
- * Gets the cloudlets' output size.
- *
- * @return the cloudlets' output size.
- */
+ /// Gets the cloudlets' output size.
+ ///
+ /// @return the cloudlets' output size.
public long getOutputSize() {
return outputSize;
}
- /**
- * Sets the cloudlets' output size.
- *
- * @param outputSize the cloudlets' output size.
- */
+ /// Sets the cloudlets' output size.
+ ///
+ /// @param outputSize the cloudlets' output size.
public void setOutputSize(long outputSize) {
this.outputSize = outputSize;
}
- /**
- * Gets the number of processing elements required to run a cloudlet.
- *
- * @return the number of processing elements required to run a cloudlet.
- */
+ /// Gets the number of processing elements required to run a cloudlet.
+ ///
+ /// @return the number of processing elements required to run a cloudlet.
public int getPes() {
return pes;
}
- /**
- * Sets the number of processing elements required to run a cloudlet.
- *
- * @param pesNumber the number of processing elements required to run
- * a cloudlet.
- */
+ /// Sets the number of processing elements required to run a cloudlet.
+ ///
+ /// @param pesNumber the number of processing elements required to run
+ /// a cloudlet.
public void setPes(int pesNumber) {
this.pes = pesNumber;
}
- /**
- * Gets the class name suffix of the Cloudlets's CPU utilization model.
- *
- * @return
- */
+ /// Gets the class name suffix of the Cloudlets's CPU utilization model.
+ ///
+ /// @return
public String getUtilizationModelCpu() {
return utilizationModelCpu;
}
- /**
- * Sets the class name suffix of the Cloudlets's CPU utilization model.
- *
- * @param utilizationModelCpu the class name suffix to set
- */
+ /// Sets the class name suffix of the Cloudlets's CPU utilization model.
+ ///
+ /// @param utilizationModelCpu the class name suffix to set
public void setUtilizationModelCpu(String utilizationModelCpu) {
this.utilizationModelCpu = utilizationModelCpu;
}
- /**
- * Gets the class name suffix of the Cloudlets's RAM utilization model.
- *
- * @return
- */
+ /// Gets the class name suffix of the Cloudlets's RAM utilization model.
+ ///
+ /// @return
public String getUtilizationModelRam() {
return utilizationModelRam;
}
- /**
- * Sets the class name suffix of the Cloudlets's RAM utilization model.
- *
- * @param utilizationModelRam the class name suffix to set
- */
+ /// Sets the class name suffix of the Cloudlets's RAM utilization model.
+ ///
+ /// @param utilizationModelRam the class name suffix to set
public void setUtilizationModelRam(String utilizationModelRam) {
this.utilizationModelRam = utilizationModelRam;
}
- /**
- * Gets the class name suffix of the Cloudlets's bandwidth utilization model.
- *
- * @return
- */
+ /// Gets the class name suffix of the Cloudlets's bandwidth utilization model.
+ ///
+ /// @return
public String getUtilizationModelBw() {
return utilizationModelBw;
}
- /**
- * Sets the class name suffix of the Cloudlets's bandwidth utilization model.
- *
- * @param utilizationModelBw the class name suffix to set
- */
+ /// Sets the class name suffix of the Cloudlets's bandwidth utilization model.
+ ///
+ /// @param utilizationModelBw the class name suffix to set
public void setUtilizationModelBw(String utilizationModelBw) {
this.utilizationModelBw = utilizationModelBw;
}
- /**
- * Gets the time to send the next cloudlet.
- *
- * @return the time to send the next cloudlet.
- */
+ /// Gets the time to send the next cloudlet.
+ ///
+ /// @return the time to send the next cloudlet.
public double getSubmissionDelay() {
return submissionDelay;
}
- /**
- * Sets the time to send the next cloudlet.
- *
- * @param submissionDelay the time to send the next cloudlet.
- */
+ /// Sets the time to send the next cloudlet.
+ ///
+ /// @param submissionDelay the time to send the next cloudlet.
public void setSubmissionDelay(double submissionDelay) {
this.submissionDelay = submissionDelay;
}
diff --git a/src/main/java/cloudreports/models/CustomerRegistry.java b/src/main/java/cloudreports/models/CustomerRegistry.java
index 6880bf9..72c9ad4 100755
--- a/src/main/java/cloudreports/models/CustomerRegistry.java
+++ b/src/main/java/cloudreports/models/CustomerRegistry.java
@@ -27,14 +27,12 @@
import java.util.LinkedList;
import java.util.List;
-/**
- * A customer registry stores information about a specific customer.
- * It contains the list of virtual machines owned by the customer as well as
- * its resources utilization profile.
- *
- * @author Thiago T. Sá
- * @since 1.0
- */
+/// A customer registry stores information about a specific customer.
+/// It contains the list of virtual machines owned by the customer as well as
+/// its resources utilization profile.
+///
+/// @author Thiago T. Sá
+/// @since 1.0
public final class CustomerRegistry implements Serializable{
private long id;
private String name = "";
@@ -48,12 +46,10 @@ public CustomerRegistry() {
setAmount(1);
}
- /**
- * Creates a new customer registry with the given name.
- *
- * @param name the name of the customer registry.
- * @since 1.0
- */
+ /// Creates a new customer registry with the given name.
+ ///
+ /// @param name the name of the customer registry.
+ /// @since 1.0
public CustomerRegistry(String name) {
this();
this.name = name;
@@ -66,74 +62,58 @@ public CustomerRegistry(String name) {
this.cloudlets = new LinkedList<>();
}
- /**
- * Gets the customer's id.
- *
- * @return the customer's id.
- */
+ /// Gets the customer's id.
+ ///
+ /// @return the customer's id.
public long getId() {
return id;
}
- /**
- * Sets the customer's id.
- *
- * @param id the customer's id.
- */
+ /// Sets the customer's id.
+ ///
+ /// @param id the customer's id.
public void setId(long id) {
this.id = id;
}
- /**
- * Gets the customer's name.
- *
- * @return the customer's name.
- */
+ /// Gets the customer's name.
+ ///
+ /// @return the customer's name.
public String getName() {
return name;
}
- /**
- * Sets the customer's name.
- *
- * @param name the customer's name.
- */
+ /// Sets the customer's name.
+ ///
+ /// @param name the customer's name.
public void setName(String name) {
this.name = name;
}
- /**
- * Gets the list of {@link Vm}s owned by this customer.
- *
- * @return
- */
+ /// Gets the list of [Vm]s owned by this customer.
+ ///
+ /// @return
public List getVms() {
return vms;
}
- /**
- * Sets the list of {@link Vm}s owned by this customer.
- *
- * @param vms the customer's virtual machines list to set.
- */
+ /// Sets the list of [Vm]s owned by this customer.
+ ///
+ /// @param vms the customer's virtual machines list to set.
public void setVms(List vms) {
this.vms = vms;
}
- /**
- * Gets the list of {@link Cloudlet}'s owned by this customer.
- *
- * @return
- */
+ /// Gets the list of [Cloudlet]'s owned by this customer.
+ ///
+ /// @return
public List getCloudlets() {
return cloudlets;
}
- /**
- * Sets the list of {@link Cloudlet}'s owned by this customer.
- *
- * @param cloudlets the customer's cloudlets list to set.
- */
+ /// Sets the list of [Cloudlet]'s owned by this customer.
+ ///
+ /// @param cloudlets the customer's cloudlets list to set.
public void setCloudlets(List cloudlets) {
this.cloudlets = cloudlets;
}
@@ -170,16 +150,12 @@ public String toString() {
return s.toString();
}
- /**
- * @return the amount
- */
+ /// @return the amount
public Integer getAmount() {
return amount;
}
- /**
- * @param amount the amount to set
- */
+ /// @param amount the amount to set
public void setAmount(Integer amount) {
this.amount = amount;
}
diff --git a/src/main/java/cloudreports/models/DatacenterRegistry.java b/src/main/java/cloudreports/models/DatacenterRegistry.java
index 3e43106..c620ab8 100755
--- a/src/main/java/cloudreports/models/DatacenterRegistry.java
+++ b/src/main/java/cloudreports/models/DatacenterRegistry.java
@@ -25,14 +25,12 @@
import java.util.ArrayList;
import java.util.List;
-/**
- * A datacenter registry stores information about a specific datacenter.
- * It contains the list of hosts owned by the datacenter, cost values and
- * other general specifications.
- *
- * @author Thiago T. Sá
- * @since 1.0
- */
+/// A datacenter registry stores information about a specific datacenter.
+/// It contains the list of hosts owned by the datacenter, cost values and
+/// other general specifications.
+///
+/// @author Thiago T. Sá
+/// @since 1.0
public final class DatacenterRegistry implements Serializable{
private long id;
private String name = "";
@@ -57,258 +55,202 @@ public DatacenterRegistry() {
setSchedulingInterval(0);
}
- /**
- * Gets the datacenter's id.
- *
- * @return the datacenter's id.
- */
+ /// Gets the datacenter's id.
+ ///
+ /// @return the datacenter's id.
public long getId() {
return id;
}
- /**
- * Sets the datacenter's id.
- *
- * @param id the datacenter's id.
- */
+ /// Sets the datacenter's id.
+ ///
+ /// @param id the datacenter's id.
public void setId(long id) {
this.id = id;
}
- /**
- * Gets the datacenter's name.
- *
- * @return the datacenter's name.
- */
+ /// Gets the datacenter's name.
+ ///
+ /// @return the datacenter's name.
public String getName() {
return name;
}
- /**
- * Sets the datacenter's name.
- *
- * @param name the datacenter's name.
- */
+ /// Sets the datacenter's name.
+ ///
+ /// @param name the datacenter's name.
public void setName(String name) {
this.name = name;
}
- /**
- * Gets the datacenter's time zone.
- *
- * @return the datacenter's time zone.
- */
+ /// Gets the datacenter's time zone.
+ ///
+ /// @return the datacenter's time zone.
public double getTimeZone() {
return timeZone;
}
- /**
- * Sets the datacenter's time zone.
- *
- * @param timeZone the datacenter's time zone.
- */
+ /// Sets the datacenter's time zone.
+ ///
+ /// @param timeZone the datacenter's time zone.
public void setTimeZone(double timeZone) {
this.timeZone = timeZone;
}
- /**
- * Gets the class name suffix for Datacenter's {@link VmAllocationPolicy}.
- *
- * @return
- */
+ /// Gets the class name suffix for Datacenter's [VmAllocationPolicy].
+ ///
+ /// @return
public String getVmAllocationPolicy() {
return vmAllocationPolicy;
}
- /**
- * Sets the datacenter's allocation policy.
- *
- * @param vmAllocationPolicy the datacenter's allocation policy.
- */
+ /// Sets the datacenter's allocation policy.
+ ///
+ /// @param vmAllocationPolicy the datacenter's allocation policy.
public void setVmAllocationPolicy(String vmAllocationPolicy) {
this.vmAllocationPolicy = vmAllocationPolicy;
}
- /**
- * Checks if virtual machines migrations are enabled.
- *
- * @return true if virtual machines migrations are enabled;
- * false otherwise.
- */
+ /// Checks if virtual machines migrations are enabled.
+ ///
+ /// @return `true` if virtual machines migrations are enabled;
+ /// `false` otherwise.
public boolean isVmMigration() {
return vmMigration;
}
- /**
- * Enables/disables virtual machines migrations.
- *
- * @param vmMigration indicates if virtual machines migrations are enabled
- * or not
- */
+ /// Enables/disables virtual machines migrations.
+ ///
+ /// @param vmMigration indicates if virtual machines migrations are enabled
+ /// or not
public void setVmMigration(boolean vmMigration) {
this.vmMigration = vmMigration;
}
- /**
- * Gets the datacenter's hosts list.
- *
- * @return the datacenter's host list.
- */
+ /// Gets the datacenter's hosts list.
+ ///
+ /// @return the datacenter's host list.
public List getHosts() {
return hosts;
}
- /**
- * Sets the datacenter's hosts list.
- *
- * @param hosts the datacenter's host list.
- */
+ /// Sets the datacenter's hosts list.
+ ///
+ /// @param hosts the datacenter's host list.
public void setHosts(List hosts) {
this.hosts = hosts;
}
- /**
- * Gets the datacenter's cost by second of processing.
- *
- * @return the datacenter's cost by second of processing.
- */
+ /// Gets the datacenter's cost by second of processing.
+ ///
+ /// @return the datacenter's cost by second of processing.
public double getCostPerSec() {
return costPerSec;
}
- /**
- * Sets the datacenter's cost by second of processing.
- *
- * @param costPerSec the datacenter's cost by second of processing.
- */
+ /// Sets the datacenter's cost by second of processing.
+ ///
+ /// @param costPerSec the datacenter's cost by second of processing.
public void setCostPerSec(double costPerSec) {
this.costPerSec = costPerSec;
}
- /**
- * Gets the datacenter's cost by RAM usage.
- *
- * @return the datacenter's cost by RAM usage.
- */
+ /// Gets the datacenter's cost by RAM usage.
+ ///
+ /// @return the datacenter's cost by RAM usage.
public double getCostPerMem() {
return costPerMem;
}
- /**
- * Sets the datacenter's cost by RAM usage.
- *
- * @param costPerMem the datacenter's cost by RAM usage.
- */
+ /// Sets the datacenter's cost by RAM usage.
+ ///
+ /// @param costPerMem the datacenter's cost by RAM usage.
public void setCostPerMem(double costPerMem) {
this.costPerMem = costPerMem;
}
- /**
- * Gets the datacenter's cost by storage usage.
- *
- * @return the datacenter's cost by storage usage.
- */
+ /// Gets the datacenter's cost by storage usage.
+ ///
+ /// @return the datacenter's cost by storage usage.
public double getCostPerStorage() {
return costPerStorage;
}
- /**
- * Sets the datacenter's cost by storage usage.
- *
- * @param costPerStorage the datacenter's cost by storage usage.
- */
+ /// Sets the datacenter's cost by storage usage.
+ ///
+ /// @param costPerStorage the datacenter's cost by storage usage.
public void setCostPerStorage(double costPerStorage) {
this.costPerStorage = costPerStorage;
}
- /**
- * Gets the datacenter's cost by bandwidth usage.
- *
- * @return the datacenter's cost by bandwidth usage.
- */
+ /// Gets the datacenter's cost by bandwidth usage.
+ ///
+ /// @return the datacenter's cost by bandwidth usage.
public double getCostPerBw() {
return costPerBw;
}
- /**
- * Sets the datacenter's cost by bandwidth usage.
- *
- * @param costPerBw the datacenter's cost by bandwidth usage.
- */
+ /// Sets the datacenter's cost by bandwidth usage.
+ ///
+ /// @param costPerBw the datacenter's cost by bandwidth usage.
public void setCostPerBw(double costPerBw) {
this.costPerBw = costPerBw;
}
- /**
- * Gets the datacenter's SAN list.
- *
- * @return the datacenter's SAN list.
- */
+ /// Gets the datacenter's SAN list.
+ ///
+ /// @return the datacenter's SAN list.
public List getSans() {
return sans;
}
- /**
- * Sets the datacenter's SAN list.
- *
- * @param sans the datacenter's SAN list.
- */
+ /// Sets the datacenter's SAN list.
+ ///
+ /// @param sans the datacenter's SAN list.
public void setSans(List sans) {
this.sans = sans;
}
- /**
- * Gets the datacenter's scheduling interval.
- *
- * @return the datacenter's scheduling interval.
- */
+ /// Gets the datacenter's scheduling interval.
+ ///
+ /// @return the datacenter's scheduling interval.
public double getSchedulingInterval() {
return schedulingInterval;
}
- /**
- * Sets the datacenter's scheduling interval.
- *
- * @param schedulingInterval the datacenter's scheduling interval.
- */
+ /// Sets the datacenter's scheduling interval.
+ ///
+ /// @param schedulingInterval the datacenter's scheduling interval.
public void setSchedulingInterval(double schedulingInterval) {
this.schedulingInterval = schedulingInterval;
}
- /**
- * Gets the datacenter's upper utilization threshold.
- *
- * @return the datacenter's upper utilization threshold.
- */
+ /// Gets the datacenter's upper utilization threshold.
+ ///
+ /// @return the datacenter's upper utilization threshold.
public double getUpperUtilizationThreshold() {
return upperUtilizationThreshold;
}
- /**
- * Sets the datacenter's upper utilization threshold.
- *
- * @param upperUtilizationThreshold the datacenter's upper utilization
- * threshold.
- */
+ /// Sets the datacenter's upper utilization threshold.
+ ///
+ /// @param upperUtilizationThreshold the datacenter's upper utilization
+ /// threshold.
public void setUpperUtilizationThreshold(double upperUtilizationThreshold) {
this.upperUtilizationThreshold = upperUtilizationThreshold;
}
- /**
- * Gets the datacenter's lower utilization threshold.
- *
- * @return the datacenter's lower utilization threshold.
- */
+ /// Gets the datacenter's lower utilization threshold.
+ ///
+ /// @return the datacenter's lower utilization threshold.
public double getLowerUtilizationThreshold() {
return lowerUtilizationThreshold;
}
- /**
- * Sets the datacenter's lower utilization threshold.
- *
- * @param lowerUtilizationThreshold the datacenter's lower utilization
- * threshold.
- */
+ /// Sets the datacenter's lower utilization threshold.
+ ///
+ /// @param lowerUtilizationThreshold the datacenter's lower utilization
+ /// threshold.
public void setLowerUtilizationThreshold(double lowerUtilizationThreshold) {
this.lowerUtilizationThreshold = lowerUtilizationThreshold;
}
@@ -357,16 +299,12 @@ public String toString() {
return s.toString();
}
- /**
- * @return the amount
- */
+ /// @return the amount
public Integer getAmount() {
return amount;
}
- /**
- * @param amount the amount to set
- */
+ /// @param amount the amount to set
public void setAmount(Integer amount) {
this.amount = amount;
}
diff --git a/src/main/java/cloudreports/models/HostRegistry.java b/src/main/java/cloudreports/models/HostRegistry.java
index bb0495f..0a126b2 100755
--- a/src/main/java/cloudreports/models/HostRegistry.java
+++ b/src/main/java/cloudreports/models/HostRegistry.java
@@ -27,14 +27,12 @@
import java.io.Serializable;
-/**
- * A host registry stores information about a specific host configuration.
- * It contains general information such as scheduling policy, power specifications
- * and amount of resources.
- *
- * @author Thiago T. Sá
- * @since 1.0
- */
+/// A host registry stores information about a specific host configuration.
+/// It contains general information such as scheduling policy, power specifications
+/// and amount of resources.
+///
+/// @author Thiago T. Sá
+/// @since 1.0
public final class HostRegistry implements Serializable {
private int id;
private int pes;
@@ -55,266 +53,208 @@ public HostRegistry() {
setAmount(1);
}
- /**
- * Gets the host's id.
- *
- * @return the host's id.
- */
+ /// Gets the host's id.
+ ///
+ /// @return the host's id.
public int getId() {
return id;
}
- /**
- * Sets the host's id.
- *
- * @param id the host's id.
- */
+ /// Sets the host's id.
+ ///
+ /// @param id the host's id.
public void setId(int id) {
this.id = id;
}
- /**
- * Gets the class name suffix for the Host's {@link VmScheduler}.
- *
- * @return
- */
+ /// Gets the class name suffix for the Host's [VmScheduler].
+ ///
+ /// @return
public String getVmScheduler() {
return vmScheduler;
}
- /**
- * Sets the host's scheduling policy.
- *
- * @param vmScheduler the host's scheduling policy.
- */
+ /// Sets the host's scheduling policy.
+ ///
+ /// @param vmScheduler the host's scheduling policy.
public void setVmScheduler(String vmScheduler) {
this.vmScheduler = vmScheduler;
}
- /**
- * Gets the host's number of processing elements.
- *
- * @return the host's number of processing elements.
- */
+ /// Gets the host's number of processing elements.
+ ///
+ /// @return the host's number of processing elements.
public int getPes() {
return pes;
}
- /**
- * Sets the host's number of processing elements.
- *
- * @param numOfpes the host's number of processing elements.
- */
+ /// Sets the host's number of processing elements.
+ ///
+ /// @param numOfpes the host's number of processing elements.
public void setPes(int numOfpes) {
this.pes = numOfpes;
}
- /**
- * Gets the amount of mips per processing elements.
- *
- * @return the amount of mips per processing elements.
- */
+ /// Gets the amount of mips per processing elements.
+ ///
+ /// @return the amount of mips per processing elements.
public double getMips() {
return mips;
}
- /**
- * Sets the amount of mips per processing elements.
- *
- * @param mips the amount of mips per processing elements.
- */
+ /// Sets the amount of mips per processing elements.
+ ///
+ /// @param mips the amount of mips per processing elements.
public void setMips(double mips) {
this.mips = mips;
}
- /**
- * Gets the host's maximum power consumption.
- *
- * @return the host's maximum power consumption.
- */
+ /// Gets the host's maximum power consumption.
+ ///
+ /// @return the host's maximum power consumption.
public double getMaxPower() {
return maxPower;
}
- /**
- * Sets the host's maximum power consumption.
- *
- * @param maxPower the host's maximum power consumption.
- */
+ /// Sets the host's maximum power consumption.
+ ///
+ /// @param maxPower the host's maximum power consumption.
public void setMaxPower(double maxPower) {
this.maxPower = maxPower;
}
- /**
- * Gets the host's static power consumption percent.
- *
- * @return the host's static power consumption percent.
- */
+ /// Gets the host's static power consumption percent.
+ ///
+ /// @return the host's static power consumption percent.
public double getStaticPowerPercent() {
return staticPowerPercent;
}
- /**
- * Sets the host's static power consumption percent.
- *
- * @param staticPowerPercent the host's static power consumption percent.
- */
+ /// Sets the host's static power consumption percent.
+ ///
+ /// @param staticPowerPercent the host's static power consumption percent.
public void setStaticPowerPercent(double staticPowerPercent) {
this.staticPowerPercent = staticPowerPercent;
}
- /**
- * Gets the name suffix of the class for Host's {@link PowerModel}.
- *
- * @return
- */
+ /// Gets the name suffix of the class for Host's [PowerModel].
+ ///
+ /// @return
public String getPowerModel() {
return powerModel;
}
- /**
- * Sets the host's power model alias.
- *
- * @param powerModel the host's power model alias.
- */
+ /// Sets the host's power model alias.
+ ///
+ /// @param powerModel the host's power model alias.
public void setPowerModel(String powerModel) {
this.powerModel = powerModel;
}
- /**
- * Gets the host's amount of RAM.
- *
- * @return the host's amount of RAM.
- */
+ /// Gets the host's amount of RAM.
+ ///
+ /// @return the host's amount of RAM.
public int getRam() {
return ram;
}
- /**
- * Sets the host's amount of RAM.
- *
- * @param ram the host's amount of RAM.
- */
+ /// Sets the host's amount of RAM.
+ ///
+ /// @param ram the host's amount of RAM.
public void setRam(int ram) {
this.ram = ram;
}
- /**
- * Gets the host's bandwidth.
- *
- * @return the host's bandwidth.
- */
+ /// Gets the host's bandwidth.
+ ///
+ /// @return the host's bandwidth.
public long getBw() {
return bw;
}
- /**
- * Sets the host's bandwidth.
- *
- * @param bw the host's bandwidth.
- */
+ /// Sets the host's bandwidth.
+ ///
+ /// @param bw the host's bandwidth.
public void setBw(long bw) {
this.bw = bw;
}
- /**
- * Gets the name suffix of the class for the host's RAM {@link ResourceProvisioner}.
- *
- * @return
- */
+ /// Gets the name suffix of the class for the host's RAM [ResourceProvisioner].
+ ///
+ /// @return
public String getRamProvisioner() {
return ramProvisioner;
}
- /**
- * Sets the name suffix of the class for the host's RAM {@link ResourceProvisioner}.
- *
- * @param ramProvisioner the host's RAM provisioner class name suffix to set.
- */
+ /// Sets the name suffix of the class for the host's RAM [ResourceProvisioner].
+ ///
+ /// @param ramProvisioner the host's RAM provisioner class name suffix to set.
public void setRamProvisioner(String ramProvisioner) {
this.ramProvisioner = ramProvisioner;
}
- /**
- * Gets the name suffix of the class for Host's {@link Bandwidth} {@link ResourceProvisioner}.
- *
- * @return
- */
+ /// Gets the name suffix of the class for Host's [Bandwidth] [ResourceProvisioner].
+ ///
+ /// @return
public String getBwProvisioner() {
return bwProvisioner;
}
- /**
- * Sets the name suffix of the class for Host's {@link Bandwidth} {@link ResourceProvisioner}.
- *
- * @param bwProvisioner the host's bandwidth provisioner class name suffix to set.
- */
+ /// Sets the name suffix of the class for Host's [Bandwidth] [ResourceProvisioner].
+ ///
+ /// @param bwProvisioner the host's bandwidth provisioner class name suffix to set.
public void setBwProvisioner(String bwProvisioner) {
this.bwProvisioner = bwProvisioner;
}
- /**
- * Gets the name suffix of the class for the Host's {@link PeProvisioner}.
- *
- * @return
- */
+ /// Gets the name suffix of the class for the Host's [PeProvisioner].
+ ///
+ /// @return
public String getPeProvisioner() {
return peProvisioner;
}
- /**
- * Sets the name suffix of the class for the Host's {@link PeProvisioner}.
- *
- * @param peProvisioner the host's processing elements provisioner class name suffix to set.
- */
+ /// Sets the name suffix of the class for the Host's [PeProvisioner].
+ ///
+ /// @param peProvisioner the host's processing elements provisioner class name suffix to set.
public void setPeProvisioner(String peProvisioner) {
this.peProvisioner = peProvisioner;
}
- /**
- * Gets the amount of hosts with this configuration.
- *
- * @return the amount of hosts with this configuration.
- */
+ /// Gets the amount of hosts with this configuration.
+ ///
+ /// @return the amount of hosts with this configuration.
public int getAmount() {
return amount;
}
- /**
- * Sets the amount of hosts with this configuration.
- *
- * @param amount the amount of hosts with this configuration.
- */
+ /// Sets the amount of hosts with this configuration.
+ ///
+ /// @param amount the amount of hosts with this configuration.
public void setAmount(int amount) {
this.amount = amount;
}
- /**
- * Gets the host's storage capacity.
- *
- * @return the host's storage capacity.
- */
+ /// Gets the host's storage capacity.
+ ///
+ /// @return the host's storage capacity.
public long getStorage() {
return storage;
}
- /**
- * Sets the host's storage capacity.
- *
- * @param storage the host's storage capacity.
- */
+ /// Sets the host's storage capacity.
+ ///
+ /// @param storage the host's storage capacity.
public void setStorage(long storage) {
this.storage = storage;
}
- /**
- * Indicates whether the host can allocate a virtual machine or not.
- *
- * @param vmr the virtual machine to be allocated.
- * @return true if the host can allocate the virtual
- * machine; false otherwise.
- * @since 1.0
- */
+ /// Indicates whether the host can allocate a virtual machine or not.
+ ///
+ /// @param vmr the virtual machine to be allocated.
+ /// @return `true` if the host can allocate the virtual
+ /// machine; `false` otherwise.
+ /// @since 1.0
public boolean canRunVM(VmRegistry vmr) {
if(this.getRam()> vmsToBrokerMap;
private Map> cloudletsToBrokerMap;
- /**
- * Instantiates a CloudSimulation object to enable building
- * and running {@link YamlCloudScenario Cloud Simulation Scenario}
- * in CloudSim Plus.
- *
- * @param scenario the {@link YamlCloudScenario} read from an YAML file
- */
+ /// Instantiates a CloudSimulation object to enable building
+ /// and running [Cloud Simulation Scenario][YamlCloudScenario]
+ /// in CloudSim Plus.
+ ///
+ /// @param scenario the [YamlCloudScenario] read from an YAML file
public CloudSimulation(YamlCloudScenario scenario) {
this(scenario, "");
}
- /**
- * Builds a {@link YamlCloudScenario Cloud Simulation Scenario} read from an YAML file
- * in CloudSim Plus.
- * @param scenario the {@link YamlCloudScenario} read from an YAML file
- * @param label A label to be used to identify the running
- * simulation scenario. Commonly this can be the name
- * of the loaded YAML file.
- */
+ /// Builds a [Cloud Simulation Scenario][YamlCloudScenario] read from an YAML file
+ /// in CloudSim Plus.
+ /// @param scenario the [YamlCloudScenario] read from an YAML file
+ /// @param label A label to be used to identify the running
+ /// simulation scenario. Commonly this can be the name
+ /// of the loaded YAML file.
public CloudSimulation(YamlCloudScenario scenario, final String label) {
this.scenario = scenario;
this.showResults = true;
@@ -101,13 +95,11 @@ public CloudSimulation(YamlCloudScenario scenario, final String label) {
this.cloudletsToBrokerMap = new HashMap<>();
}
- /**
- * Creates a map containing the abstract customer information ({@link CustomerRegistry})
- * used to create each concrete CloudSim customer ({@link DatacenterBroker}).
- *
- * @return Returns the map created.
- * @see YamlCloudScenario#getCustomers()
- */
+ /// Creates a map containing the abstract customer information ([CustomerRegistry])
+ /// used to create each concrete CloudSim customer ([DatacenterBroker]).
+ ///
+ /// @return Returns the map created.
+ /// @see YamlCloudScenario#getCustomers()
private Map createBrokers() {
final int totalBrokerAmount = scenario.getCustomers().stream().mapToInt(CustomerRegistry::getAmount).sum();
final var map = new HashMap(totalBrokerAmount);
@@ -120,14 +112,12 @@ private Map createBrokers() {
return map;
}
- /**
- * Creates the list of VMs in CloudSim Plus for each customer represented by a {@link DatacenterBroker}.
- *
- * @param crMap a Map between a {@link DatacenterBroker} representing a customer in CloudSim Plus
- * and the {@link CustomerRegistry} object used to create VMs and Cloudlets for such a broker.
- * @return a map containing the list of created VMs for each customer (DatacenterBroker).
- * @see #createBrokers()
- */
+ /// Creates the list of VMs in CloudSim Plus for each customer represented by a [DatacenterBroker].
+ ///
+ /// @param crMap a Map between a [DatacenterBroker] representing a customer in CloudSim Plus
+ /// and the [CustomerRegistry] object used to create VMs and Cloudlets for such a broker.
+ /// @return a map containing the list of created VMs for each customer (DatacenterBroker).
+ /// @see #createBrokers()
private Map> createVmListForAllBrokers(
final Map crMap)
{
@@ -142,15 +132,13 @@ private Map> createVmListForAllBrokers(
return vmMap;
}
- /**
- * Creates the list of VMs in CloudSim Plus for a given customer represented by a {@link DatacenterBroker}.
- *
- * @param broker {@link DatacenterBroker} representing a customer in CloudSim Plus, for who VMs will be created
- * @param cr {@link CustomerRegistry} object used to create VMs and Cloudlets for such a broker
- * @param createdVms the number of VMs already created
- * @return a map containing the list of created VMs for the given customer (DatacenterBroker)
- * @see #createBrokers()
- */
+ /// Creates the list of VMs in CloudSim Plus for a given customer represented by a [DatacenterBroker].
+ ///
+ /// @param broker [DatacenterBroker] representing a customer in CloudSim Plus, for who VMs will be created
+ /// @param cr [CustomerRegistry] object used to create VMs and Cloudlets for such a broker
+ /// @param createdVms the number of VMs already created
+ /// @return a map containing the list of created VMs for the given customer (DatacenterBroker)
+ /// @see #createBrokers()
private List createVmListForOneBroker(
final DatacenterBroker broker,
final CustomerRegistry cr,
@@ -182,14 +170,12 @@ private Vm createVm(final int id,
return vm;
}
- /**
- * Creates a map that stores the cloudlet list for each customer (broker).
- *
- * @param brokerRegistries the map containing the abstract customer information
- * ({@link CustomerRegistry}) obtained from the YAML file, for each
- * concrete customer created ({@link DatacenterBroker}).
- * @return the map of Cloudlets created.
- */
+ /// Creates a map that stores the cloudlet list for each customer (broker).
+ ///
+ /// @param brokerRegistries the map containing the abstract customer information
+ /// ([CustomerRegistry]) obtained from the YAML file, for each
+ /// concrete customer created ([DatacenterBroker]).
+ /// @return the map of Cloudlets created.
private Map> createCloudlets(
final Map brokerRegistries)
{
@@ -234,29 +220,25 @@ private Cloudlet createCloudlet(
return cloudlet;
}
- /**
- * Searches for a VM, with the specified id, at the broker (that represents
- * the customer).
- *
- * @param broker The broker (customer) where to search for the VM
- * @param vmId The desired VM to be located.
- * @return the VM with the given ID or {@link Vm#NULL} if not found.
- */
+ /// Searches for a VM, with the specified id, at the broker (that represents
+ /// the customer).
+ ///
+ /// @param broker The broker (customer) where to search for the VM
+ /// @param vmId The desired VM to be located.
+ /// @return the VM with the given ID or [Vm#NULL] if not found.
private Vm findVm(final DatacenterBroker broker, final int vmId) {
return Objects.requireNonNull(vmsToBrokerMap.get(broker), "Broker not found").stream().filter(vm -> vm.getId() == vmId).findFirst().orElse(Vm.NULL);
}
- /**
- * Creates the concrete Datacenter list from the abstract
- * DatacenterRegistry list.
- *
- * @return Returns the list of created CloudSim datacenters
- * @throws IllegalArgumentException Throws when the method,
- * starting from the information at YAML file,
- * sets invalid parameters for CloudSim Datacenter objects
- * to be created.
- * @see YamlCloudScenario#getDatacenters()
- */
+ /// Creates the concrete Datacenter list from the abstract
+ /// DatacenterRegistry list.
+ ///
+ /// @return Returns the list of created CloudSim datacenters
+ /// @throws IllegalArgumentException Throws when the method,
+ /// starting from the information at YAML file,
+ /// sets invalid parameters for CloudSim Datacenter objects
+ /// to be created.
+ /// @see YamlCloudScenario#getDatacenters()
private List createDatacenters() throws IllegalArgumentException {
String datacenterName;
int datacenterCount = 0;
@@ -282,17 +264,15 @@ private List createDatacenters() throws IllegalArgumentException {
return datacenterList;
}
- /**
- * Creates the concrete host list from the abstract DatacenterRegistry
- * object.
- *
- * @param dcr A specific abstract datacenter information
- * get from the datacenterRegistries list at the YAML file.
- * @param initialHostId the ID for the first Host to be created
- * @return the list of created hosts from the specified datacenterRegistry.
- * @throws RuntimeException
- * @see YamlCloudScenario#getDatacenters()
- */
+ /// Creates the concrete host list from the abstract DatacenterRegistry
+ /// object.
+ ///
+ /// @param dcr A specific abstract datacenter information
+ /// get from the datacenterRegistries list at the YAML file.
+ /// @param initialHostId the ID for the first Host to be created
+ /// @return the list of created hosts from the specified datacenterRegistry.
+ /// @throws RuntimeException
+ /// @see YamlCloudScenario#getDatacenters()
private List createHosts(
final DatacenterRegistry dcr, int initialHostId) throws RuntimeException
{
@@ -352,19 +332,17 @@ private int generateHostId(final HostRegistry hr, final int currentHostCount) {
return hr.getId() != 0 ? hr.getId() : currentHostCount;
}
- /**
- * Creates a CloudSim StorageSystem Area Network (SAN) from an abstract DatacenterRegistry
- * information, get from a YAML specification file.
- *
- * @param dcr A specific DatacenterRegistry information
- * to be used to create the SANs.
- * @return Returns the SANs created list.
- * @throws IllegalArgumentException Throws when the method,
- * starting from the information at YAML file,
- * sets invalid parameters for CloudSim SAN objects
- * to be created.
- * @see YamlCloudScenario#getDatacenters()
- */
+ /// Creates a CloudSim StorageSystem Area Network (SAN) from an abstract DatacenterRegistry
+ /// information, get from a YAML specification file.
+ ///
+ /// @param dcr A specific DatacenterRegistry information
+ /// to be used to create the SANs.
+ /// @return Returns the SANs created list.
+ /// @throws IllegalArgumentException Throws when the method,
+ /// starting from the information at YAML file,
+ /// sets invalid parameters for CloudSim SAN objects
+ /// to be created.
+ /// @see YamlCloudScenario#getDatacenters()
private List createSan(final DatacenterRegistry dcr) throws IllegalArgumentException {
final var storageList = new ArrayList(dcr.getSans().size());
for (SanStorageRegistry sr : dcr.getSans()) {
@@ -375,15 +353,13 @@ private List createSan(final DatacenterRegistry dcr) throws IllegalA
return storageList;
}
- /**
- * Sets the attributes of the DatacenterCharacteristics inside the Datacenter.
- * It represents that characteristics of one CloudSim Datacenter,
- * including the list of hosts of the Datacenter.
- *
- * @param dc the Datacenter to set its characteristics
- * @param dcr The abstract DatacenterRegistry information, obtained from the YAML file,
- * to be used to define the Datacenter characteristics.
- */
+ /// Sets the attributes of the DatacenterCharacteristics inside the Datacenter.
+ /// It represents that characteristics of one CloudSim Datacenter,
+ /// including the list of hosts of the Datacenter.
+ ///
+ /// @param dc the Datacenter to set its characteristics
+ /// @param dcr The abstract DatacenterRegistry information, obtained from the YAML file,
+ /// to be used to define the Datacenter characteristics.
private void setDatacenterCharacteristics(final Datacenter dc, final DatacenterRegistry dcr)
{
dc.getCharacteristics()
@@ -393,13 +369,11 @@ private void setDatacenterCharacteristics(final Datacenter dc, final DatacenterR
.setCostPerBw(dcr.getCostPerBw());
}
- /**
- * Creates a list of PEs (Processing Elements, i.e. CPUs/Cores)
- * for a host or VM.
- *
- * @param hr The abstract Host information obtained from the YAML file.
- * @return Returns the list of PEs created.
- */
+ /// Creates a list of PEs (Processing Elements, i.e. CPUs/Cores)
+ /// for a host or VM.
+ ///
+ /// @param hr The abstract Host information obtained from the YAML file.
+ /// @return Returns the list of PEs created.
private List createHostProcessingElements(final HostRegistry hr) {
final var peList = new ArrayList(hr.getPes());
for (int i = 0; i < hr.getPes(); i++) {
@@ -409,9 +383,7 @@ private List createHostProcessingElements(final HostRegistry hr) {
return peList;
}
- /**
- * Builds and runs the simulation scenario in CloudSim Plus.
- */
+ /// Builds and runs the simulation scenario in CloudSim Plus.
@Override
public void run() {
final double startTime = System.currentTimeMillis();
@@ -506,30 +478,24 @@ private int getNumCloudletsFromAllCustomers() {
private int getNumCloudletsForCustomer(CustomerRegistry customer) {
return customer.getCloudlets().stream().mapToInt(cloudlet -> cloudlet.getAmount()).sum();
}
- /**
- * Gets the CloudSim Plus instance used to run the simulation.
- *
- * @return
- */
+ /// Gets the [CloudSim Plus](http://cloudsimplus.org) instance used to run the simulation.
+ ///
+ /// @return
public CloudSimPlus getCloudSimPlus() {
return cloudsimplus;
}
- /**
- * Gets the list of {@link Datacenter}s created in CloudSim Plus, obtained from the
- * {@link DatacenterRegistry}.
- *
- * @return
- */
+ /// Gets the list of [Datacenter]s created in CloudSim Plus, obtained from the
+ /// [DatacenterRegistry].
+ ///
+ /// @return
public List getDatacenters() {
return datacenters;
}
- /**
- * Gets the list of all {@link Host}s created in CloudSim Plus for all {@link Datacenter}s.
- *
- * @return
- */
+ /// Gets the list of all [Host]s created in CloudSim Plus for all [Datacenter]s.
+ ///
+ /// @return
public List getHosts() {
return datacenters.stream()
.map(Datacenter::getHostList)
@@ -537,49 +503,39 @@ public List getHosts() {
.collect(Collectors.toList());
}
- /**
- * Gets the list of {@link DatacenterBroker}s created in CloudSim Plus,
- * each one representing a customer obtained from a {@link CustomerRegistry}.
- * @return
- */
+ /// Gets the list of [DatacenterBroker]s created in CloudSim Plus,
+ /// each one representing a customer obtained from a [CustomerRegistry].
+ /// @return
public List getBrokers() {
return new ArrayList<>(brokers.keySet());
}
- /**
- * Gets the list of Virtual Machines ({@link Vm}) for each customer ({@link DatacenterBroker})
- * created in CloudSim Plus.
- * @return the broker's VM list or null if the broker is unknown
- * @see #getVms()
- */
+ /// Gets the list of Virtual Machines ([Vm]) for each customer ([DatacenterBroker])
+ /// created in CloudSim Plus.
+ /// @return the broker's VM list or null if the broker is unknown
+ /// @see #getVms()
public @Nullable List getVms(DatacenterBroker broker){
return vmsToBrokerMap.get(broker);
}
- /**
- * Gets the list of all Virtual Machines ({@link Vm} created in CloudSim Plus.
- * @return
- * @see #getVms(DatacenterBroker)
- */
+ /// Gets the list of all Virtual Machines ([Vm] created in CloudSim Plus.
+ /// @return
+ /// @see #getVms(DatacenterBroker)
public List getVms(){
return vmsToBrokerMap.values().stream().flatMap(List::stream).collect(toList());
}
- /**
- * Gets the list of applications ({@link Cloudlet}s) for each customer ({@link DatacenterBroker})
- * created in CloudSim Plus.
- * @return the broker's Cloudlet list or null if the broker is unknown
- * @see #getCloudlets()
- */
+ /// Gets the list of applications ([Cloudlet]s) for each customer ([DatacenterBroker])
+ /// created in CloudSim Plus.
+ /// @return the broker's Cloudlet list or null if the broker is unknown
+ /// @see #getCloudlets()
public @Nullable List getCloudlets(DatacenterBroker broker){
return cloudletsToBrokerMap.get(broker);
}
- /**
- * Gets the list of all applications ({@link Cloudlet}s) created in CloudSim Plus.
- * @return
- * @see #getCloudlets(DatacenterBroker)
- */
+ /// Gets the list of all applications ([Cloudlet]s) created in CloudSim Plus.
+ /// @return
+ /// @see #getCloudlets(DatacenterBroker)
public List getCloudlets(){
return cloudletsToBrokerMap.values().stream().flatMap(List::stream).collect(toList());
}
diff --git a/src/main/java/org/cloudsimplus/automation/LogUtils.java b/src/main/java/org/cloudsimplus/automation/LogUtils.java
index 974b4f8..76c4ef6 100755
--- a/src/main/java/org/cloudsimplus/automation/LogUtils.java
+++ b/src/main/java/org/cloudsimplus/automation/LogUtils.java
@@ -27,20 +27,16 @@
package org.cloudsimplus.automation;
-/**
- * Useful methods to print log information to the terminal.
- *
- * @author Manoel Campos da Silva Filho
- */
+/// Useful methods to print log information to the terminal.
+///
+/// @author Manoel Campos da Silva Filho
public class LogUtils {
private static String colSeparator="|\t";
- /**
- * Print an array of objects like a table.
- * @param captions The captions of the table
- * @param dataArray The data to be printed.
- * @see LogUtils#printCaptions(java.lang.String[])
- */
+ /// Print an array of objects like a table.
+ /// @param captions The captions of the table
+ /// @param dataArray The data to be printed.
+ /// @see LogUtils#printCaptions(java.lang.String[])
public static void printLine(String[] captions, Object[] dataArray, String colSeparator) {
String s;
String fmt;
@@ -63,11 +59,9 @@ public static void printLine(String[] captions, Object... dataArray) {
printLine(captions, dataArray, colSeparator);
}
- /**
- * Print the captions of a table to be presented at the terminal.
- * @param captions Captions of the table
- * @see LogUtils#printCaptions(java.lang.String[])
- */
+ /// Print the captions of a table to be presented at the terminal.
+ /// @param captions Captions of the table
+ /// @see LogUtils#printCaptions(java.lang.String[])
public static void printCaptions(String[] captions, String colSeparator) {
for (String caption : captions) {
System.out.print(caption + colSeparator);
@@ -79,16 +73,12 @@ public static void printCaptions(String... captions) {
printCaptions(captions, colSeparator);
}
- /**
- * @return the colSeparator
- */
+ /// @return the colSeparator
public static String getColSeparator() {
return colSeparator;
}
- /**
- * @param aColSeparator the colSeparator to set
- */
+ /// @param aColSeparator the colSeparator to set
public static void setColSeparator(String aColSeparator) {
colSeparator = aColSeparator;
}
diff --git a/src/main/java/org/cloudsimplus/automation/PolicyLoader.java b/src/main/java/org/cloudsimplus/automation/PolicyLoader.java
index 074ad4b..2c82638 100755
--- a/src/main/java/org/cloudsimplus/automation/PolicyLoader.java
+++ b/src/main/java/org/cloudsimplus/automation/PolicyLoader.java
@@ -42,37 +42,29 @@
import java.util.logging.Level;
import java.util.logging.Logger;
-/**
- * Dynamically creates instances of classes such as {@link VmScheduler}, {@link VmAllocationPolicy},
- * {@link CloudletScheduler}, {@link ResourceProvisioner} and others from the class name of
- * the object to be instantiated.
- *
- * @author Manoel Campos da Silva Filho
- */
+/// Dynamically creates instances of classes such as [VmScheduler], [VmAllocationPolicy],
+/// [CloudletScheduler], [ResourceProvisioner] and others from the class name of
+/// the object to be instantiated.
+///
+/// @author Manoel Campos da Silva Filho
public class PolicyLoader {
- /**
- * Map of already loaded class, which are stored
- * to speedup getting a class from its name.
- * This way, after a class is get from the first time,
- * it isn't used reflection anymore when a class with the same
- * name is requested again.
- * Each key is a full class name and each value is the class itself.
- */
+ /// Map of already loaded class, which are stored
+ /// to speedup getting a class from its name.
+ /// This way, after a class is get from the first time,
+ /// it isn't used reflection anymore when a class with the same
+ /// name is requested again.
+ /// Each key is a full class name and each value is the class itself.
private static final Map map = new HashMap<>();
- /**
- * The base CloudSim package name.
- */
+ /// The base CloudSim package name.
private static final String PKG = "org.cloudsimplus";
- /**
- * Try to get a class corresponding to its full name from
- * the map of already loaded classes.
- * If the class was not loaded yet, try to load
- * and return it.
- * @param fullClassName the full qualified name of the class (including package name)
- * @return the loaded class
- */
+ /// Try to get a class corresponding to its full name from
+ /// the map of already loaded classes.
+ /// If the class was not loaded yet, try to load
+ /// and return it.
+ /// @param fullClassName the full qualified name of the class (including package name)
+ /// @return the loaded class
private static Class loadClass(final String fullClassName){
Class klass = map.get(fullClassName);
if(klass == null){
@@ -101,21 +93,19 @@ public static VmScheduler vmScheduler(final String classSuffix) throws RuntimeEx
}
}
- /**
- * Gets an instance of a resource provisioner with a given
- * class name information.
- *
- * @param classPrefix The class prefix for the provisioner.
- * If you want to instantiate the provisioner class BwProvisionerSimple,
- * the provisioner prefix is "Bw"
- * @param classSufix The class suffix of the provisioner.
- * If you want to instantiate the provisioner class BwProvisionerSimple,
- * the provisioner suffix is just "Simple"
- * @return A new instance of the provisioner with the given name.
- * For instance, if the class suffix is "Simple",
- * returns an instance the ResourceProvisionerSimple class.
- * @throws RuntimeException
- */
+ /// Gets an instance of a resource provisioner with a given
+ /// class name information.
+ ///
+ /// @param classPrefix The class prefix for the provisioner.
+ /// If you want to instantiate the provisioner class BwProvisionerSimple,
+ /// the provisioner prefix is "Bw"
+ /// @param classSufix The class suffix of the provisioner.
+ /// If you want to instantiate the provisioner class BwProvisionerSimple,
+ /// the provisioner suffix is just "Simple"
+ /// @return A new instance of the provisioner with the given name.
+ /// For instance, if the class suffix is "Simple",
+ /// returns an instance the ResourceProvisionerSimple class.
+ /// @throws RuntimeException
private static T resourceProvisioner(
final String classPrefix, final String classSufix) throws RuntimeException {
try {
diff --git a/src/main/java/org/cloudsimplus/automation/Start.java b/src/main/java/org/cloudsimplus/automation/Start.java
index bb94a27..ef304f3 100755
--- a/src/main/java/org/cloudsimplus/automation/Start.java
+++ b/src/main/java/org/cloudsimplus/automation/Start.java
@@ -29,13 +29,11 @@
import java.io.FileNotFoundException;
import java.util.regex.Pattern;
-/**
- * Starts the tool by loading a Cloud Computing simulation scenario from an YAML file given by command line.
- * This is the bootstrap class that starts the tool and parses command line arguments.
- *
- * @author Manoel Campos da Silva Filho
- * @see YamlCloudScenarioReader
- */
+/// Starts the tool by loading a Cloud Computing simulation scenario from an YAML file given by command line.
+/// This is the bootstrap class that starts the tool and parses command line arguments.
+///
+/// @author Manoel Campos da Silva Filho
+/// @see YamlCloudScenarioReader
public final class Start {
private final Options options = new Options();
@SuppressWarnings("NullAway.Init") // set in the constructor after parsing the command line
@@ -43,20 +41,16 @@ public final class Start {
@SuppressWarnings("NullAway.Init") // set by parseCommandLineOptions(), called from the constructor
private CommandLine cmd;
- /**
- * Executes the command line interface of the applications.
- *
- * @param args command line arguments.
- */
+ /// Executes the command line interface of the applications.
+ ///
+ /// @param args command line arguments.
public static void main(String[] args) {
new Start(args);
}
- /**
- * Default constructor that parses command line parameters
- * and actually execute the tool.
- * @param args command line parameters (see {@link #main(String[])})
- */
+ /// Default constructor that parses command line parameters
+ /// and actually execute the tool.
+ /// @param args command line parameters (see [#main(String\[\])])
private Start(final String[] args){
try {
if(!parseCommandLineOptions(args)){
@@ -84,10 +78,8 @@ private void showUsageHelp() {
formatter.printHelp(getApplicationStartCmd() +" [options] YamlFilePath", options);
}
- /**
- * Parses options given by command line.
- * @param args the command line options
- */
+ /// Parses options given by command line.
+ /// @param args the command line options
private boolean parseCommandLineOptions(String[] args) throws ParseException {
final var option = new Option("v", "Enables CloudSim Plus Log (disabled by default)");
option.setLongOpt("verbose");
@@ -112,14 +104,12 @@ private boolean parseCommandLineOptions(String[] args) throws ParseException {
return true;
}
- /**
- * Gets the command used to launch the application.
- * If the application was launched from the jar file, returns
- * a command like "java -jar name-of-the-jar-file".
- * If it was launched directly from the class file,
- * returns a command like "java class-file".
- * @return
- */
+ /// Gets the command used to launch the application.
+ /// If the application was launched from the jar file, returns
+ /// a command like "java -jar name-of-the-jar-file".
+ /// If it was launched directly from the class file,
+ /// returns a command like "java class-file".
+ /// @return
private String getApplicationStartCmd() {
final String fullClassFilePath = getFullClassFilePath();
final String jarRegex = ".*\\/(.*\\.jar).*\\/";
@@ -136,19 +126,15 @@ private String regexMatch(final String regex, final String text) {
return "";
}
- /**
- * Gets the full file path of this class, which may include the
- * path of a jar if the class is being run from a jar package.
- * @return
- */
+ /// Gets the full file path of this class, which may include the
+ /// path of a jar if the class is being run from a jar package.
+ /// @return
private String getFullClassFilePath() {
final String classFileName = '/' + Start.class.getName().replace('.', '/') + ".class";
return Start.class.getResource(classFileName).getFile();
}
- /**
- * Builds and run Cloud Computing simulation scenarios loaded from the YAML file.
- */
+ /// Builds and run Cloud Computing simulation scenarios loaded from the YAML file.
public void build() {
System.out.printf(
"Starting %d Simulation Scenario(s) from file %s in CloudSim Plus %s\n",
@@ -165,21 +151,17 @@ public void build() {
}
}
- /**
- * Gets the file name from the command line arguments,
- * which is the first argument remained after the parsing.
- *
- * @return
- */
+ /// Gets the file name from the command line arguments,
+ /// which is the first argument remained after the parsing.
+ ///
+ /// @return
private String getFileNameFromCommandLine() {
return cmd.getArgs().length > 0 ? cmd.getArgs()[0] : "";
}
- /**
- * Checks if CloudSim Plus Log has to be enabled.
- *
- * @return
- */
+ /// Checks if CloudSim Plus Log has to be enabled.
+ ///
+ /// @return
private boolean isToEnableLog() {
return cmd.hasOption("v");
}
diff --git a/src/main/java/org/cloudsimplus/automation/YamlCloudScenario.java b/src/main/java/org/cloudsimplus/automation/YamlCloudScenario.java
index 5c08e26..6d59d70 100755
--- a/src/main/java/org/cloudsimplus/automation/YamlCloudScenario.java
+++ b/src/main/java/org/cloudsimplus/automation/YamlCloudScenario.java
@@ -27,67 +27,57 @@
import java.util.*;
-/**
- * Represents a Cloud Computing simulation scenario read from an YAML file.
- * Each scenario inside an YAML file is represented by an object of this class
- * and is used to create a CloudSim Plus simulation.
- * It stores all data representing the simulation to be created in CloudSim Plus
- * and enables one to build and execute the simulation.
- *
- * Objects of this class are created automatically by
- * a {@link YamlCloudScenarioReader} class.
- * After you have one of these instances, you may
- * pass it to the the {@link CloudSimulation} constructor
- * to create the Cloud Computing simulation using CloudSim Plus
- * and further run it.
- *
- *
- * Each scenario inside the YAML file can be delimited using 3 dashes:
- *
---
- *
- *
- * @author Manoel Campos da Silva Filho
- * @see YamlCloudScenarioReader
- */
+/// Represents a Cloud Computing simulation scenario read from an YAML file.
+/// Each scenario inside an YAML file is represented by an object of this class
+/// and is used to create a CloudSim Plus simulation.
+/// It stores all data representing the simulation to be created in [CloudSim Plus](http://cloudsimplus.org)
+/// and enables one to build and execute the simulation.
+///
+/// **Objects of this class are created automatically by
+/// a [YamlCloudScenarioReader] class.**
+/// After you have one of these instances, you may
+/// pass it to the the [CloudSimulation] constructor
+/// to create the Cloud Computing simulation using CloudSim Plus
+/// and further run it.
+///
+/// Each scenario inside the YAML file can be delimited using 3 dashes: `---`.
+///
+/// @author Manoel Campos da Silva Filho
+/// @see YamlCloudScenarioReader
public class YamlCloudScenario {
- /** @see #getDatacenters() */
+ /// @see #getDatacenters()
private List datacenters;
- /** @see #getCustomers() */
+ /// @see #getCustomers()
private List customers;
- /**
- * A default constructor that is called by a {@link YamlReader} using
- * reflection. This way, usually objects of this class don't have to be created manually.
- *
- * @see YamlCloudScenarioReader
- */
+ /// A default constructor that is called by a [YamlReader] using
+ /// reflection. This way, usually objects of this class don't have to be created manually.
+ ///
+ /// @see YamlCloudScenarioReader
public YamlCloudScenario() {
this.customers = new ArrayList<>();
this.datacenters = new ArrayList<>();
}
- /**
- * Gets a List of {@link DatacenterRegistry} objects representing information about data centers.
- * These objects contain, for instance, the amount of datacenters
- * to be created and the host amount and configurations.
- *
- * Each YAML scenario can have multiple datacenters
- * that are abstractly specified using DatacenterRegistry
- * objects. The concrete datacenters are
- * created by CloudSim Plus.
- * @return
- */
+ /// Gets a List of [DatacenterRegistry] objects representing information about data centers.
+ /// These objects contain, for instance, the amount of datacenters
+ /// to be created and the host amount and configurations.
+ ///
+ /// Each YAML scenario can have multiple datacenters
+ /// that are abstractly specified using DatacenterRegistry
+ /// objects. The concrete datacenters are
+ /// created by CloudSim Plus.
+ ///
+ /// @return
public List getDatacenters() {
return datacenters;
}
- /**
- * Gets a List of {@link DatacenterRegistry} objects.
- *
- * @param datacenters the datacenters to set
- * @see #getDatacenters()
- */
+ /// Gets a List of [DatacenterRegistry] objects.
+ ///
+ /// @param datacenters the datacenters to set
+ /// @see #getDatacenters()
public void setDatacenters(final List datacenters) {
if(datacenters == null){
return;
@@ -95,27 +85,23 @@ public void setDatacenters(final List datacenters) {
this.datacenters = datacenters;
}
- /**
- * Gets a List of {@link CustomerRegistry} objects representing abstract information about customers (brokers).
- * These objects contain, for instance, the amount of customers
- * to be created and the VM amount and configurations.
- *
- * Each YAML scenario can have multiple customers
- * that are abstractly specified using CustomerRegistry
- * objects. The concrete customers are
- * created by CloudSim Plus as its DatacenterBroker objects.
- *
- * @return
- */
+ /// Gets a List of [CustomerRegistry] objects representing abstract information about customers (brokers).
+ /// These objects contain, for instance, the amount of customers
+ /// to be created and the VM amount and configurations.
+ ///
+ /// Each YAML scenario can have multiple customers
+ /// that are abstractly specified using CustomerRegistry
+ /// objects. The concrete customers are
+ /// created by CloudSim Plus as its DatacenterBroker objects.
+ ///
+ /// @return
public List getCustomers() {
return customers;
}
- /**
- * Sets a List of {@link CustomerRegistry} objects representing abstract information about customers (brokers).
- * @param customers the customers to set
- * @see #getCustomers()
- */
+ /// Sets a List of [CustomerRegistry] objects representing abstract information about customers (brokers).
+ /// @param customers the customers to set
+ /// @see #getCustomers()
public void setCustomers(final List customers) {
if(customers == null){
return;
diff --git a/src/main/java/org/cloudsimplus/automation/YamlCloudScenarioReader.java b/src/main/java/org/cloudsimplus/automation/YamlCloudScenarioReader.java
index 62c8982..da82f58 100755
--- a/src/main/java/org/cloudsimplus/automation/YamlCloudScenarioReader.java
+++ b/src/main/java/org/cloudsimplus/automation/YamlCloudScenarioReader.java
@@ -33,34 +33,29 @@
import java.util.ArrayList;
import java.util.List;
-/**
- * Reads Cloud Computing simulation scenarios
- * from an YAML file and stores them into a {@link #getScenarios() List} of
- * {@link YamlCloudScenario} objects.
- * These {@link YamlCloudScenario} are built using CloudSim Plus.
- *
- * To create simulation scenarios from an YAML file,
- * you have to use the class constructor that will try
- * to read the given file.
- * The scenarios read will be available in the {@link #getScenarios() scenarios} attribute.
- * Then, to build and run each simulation scenario in CloudSim Plus,
- * instantiate a {@link CloudSimulation} passing a {@link YamlCloudScenario} to it.
- *
- *
- * @author Manoel Campos da Silva Filho
- * @see YamlCloudScenario
- */
+/// Reads Cloud Computing simulation scenarios
+/// from an YAML file and stores them into a [List][#getScenarios()] of
+/// [YamlCloudScenario] objects.
+/// These [YamlCloudScenario] are built using [CloudSim Plus](http://cloudsimplus.org).
+///
+/// To create simulation scenarios from an YAML file,
+/// you have to use the class constructor that will try
+/// to read the given file.
+/// The scenarios read will be available in the [scenarios][#getScenarios()] attribute.
+/// Then, to build and run each simulation scenario in CloudSim Plus,
+/// instantiate a [CloudSimulation] passing a [YamlCloudScenario] to it.
+///
+/// @author Manoel Campos da Silva Filho
+/// @see YamlCloudScenario
public class YamlCloudScenarioReader {
private final File file;
private final List scenarios;
- /**
- * Instantiates a YamlCloudScenarioReader and
- * reads the YAML file containing the data to create Cloud Computing simulation scenarios.
- * Then, the List of simulation scenarios can be accessed using {@link #getScenarios()}.
- *
- * @param filePath the path of the YAML file to read
- */
+ /// Instantiates a YamlCloudScenarioReader and
+ /// reads the YAML file containing the data to create Cloud Computing simulation scenarios.
+ /// Then, the List of simulation scenarios can be accessed using [#getScenarios()].
+ ///
+ /// @param filePath the path of the YAML file to read
public YamlCloudScenarioReader(final String filePath) throws IllegalArgumentException, FileNotFoundException, YamlException {
this.file = new File(filePath);
@@ -71,13 +66,11 @@ public YamlCloudScenarioReader(final String filePath) throws IllegalArgumentExce
this.scenarios = readYamlFile();
}
- /**
- * Reads the YAML file containing the data to creat Cloud Computing simulation scenarios.
- *
- * @return a List of simulation scenarios specified inside the YAML file.
- * @throws FileNotFoundException when the YAML file is not found.
- * @throws YamlException when there is any error parsing the YAML file.
- */
+ /// Reads the YAML file containing the data to creat Cloud Computing simulation scenarios.
+ ///
+ /// @return a List of simulation scenarios specified inside the YAML file.
+ /// @throws FileNotFoundException when the YAML file is not found.
+ /// @throws YamlException when there is any error parsing the YAML file.
private List readYamlFile() throws FileNotFoundException, YamlException {
final var scenariosList = new ArrayList();
final var reader = createYamlReader();
@@ -90,13 +83,11 @@ private List readYamlFile() throws FileNotFoundException, Yam
return scenariosList;
}
- /**
- * Creates an {@link YamlReader} to read an YAML file and instantiate
- * java objects for the entries inside the file.
- *
- * @return the {@link YamlReader} to enable reading the YAML file
- * @throws FileNotFoundException
- */
+ /// Creates an [YamlReader] to read an YAML file and instantiate
+ /// java objects for the entries inside the file.
+ ///
+ /// @return the [YamlReader] to enable reading the YAML file
+ /// @throws FileNotFoundException
private YamlReader createYamlReader() throws FileNotFoundException {
final var reader = new YamlReader(new FileReader(file));
final YamlConfig cfg = reader.getConfig();
@@ -112,18 +103,14 @@ private YamlReader createYamlReader() throws FileNotFoundException {
return reader;
}
- /**
- * Gets the YAML {@link File} to read.
- * @return
- */
+ /// Gets the YAML [File] to read.
+ /// @return
public File getFile() {
return file;
}
- /**
- * Gets the List of Cloud Simulation scenarios loaded from the {@link #getFile() YAML file}.
- * @return
- */
+ /// Gets the List of Cloud Simulation scenarios loaded from the [YAML file][#getFile()].
+ /// @return
public List getScenarios() {
return scenarios;
}
diff --git a/src/main/java/org/cloudsimplus/automation/examples/Example1.java b/src/main/java/org/cloudsimplus/automation/examples/Example1.java
index 2571beb..16d90cc 100755
--- a/src/main/java/org/cloudsimplus/automation/examples/Example1.java
+++ b/src/main/java/org/cloudsimplus/automation/examples/Example1.java
@@ -1,3 +1,25 @@
+/*
+ * CloudSim Plus Automation: A Human Readable Scenario Specification for Automated Creation of Simulations on CloudSim Plus.
+ * https://github.com/manoelcampos/CloudSimAutomation
+ *
+ * Copyright (C) 2015-2016 Universidade da Beira Interior (UBI, Portugal) and
+ * the Instituto Federal de Educação Ciência e Tecnologia do Tocantins (IFTO, Brazil).
+ *
+ * This file is part of CloudSim Automation.
+ *
+ * CloudSim Plus Automation is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * CloudSim Plus Automation is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with CloudSim Automation. If not, see .
+ */
package org.cloudsimplus.automation.examples;
import com.esotericsoftware.yamlbeans.YamlException;
@@ -9,13 +31,11 @@
import java.io.FileNotFoundException;
-/**
- * Starts the example, parsing a YAML file containing
- * the simulation scenario, building and running it
- * in CloudSim Plus.
- *
- * @author Manoel Campos da Silva Filho
- */
+/// Starts the example, parsing a YAML file containing
+/// the simulation scenario, building and running it
+/// in CloudSim Plus.
+///
+/// @author Manoel Campos da Silva Filho
public class Example1 {
private Example1(){
System.out.printf("Starting %s on %s%n", getClass().getSimpleName(), CloudSimPlus.VERSION);
diff --git a/src/main/java/org/cloudsimplus/automation/examples/package-info.java b/src/main/java/org/cloudsimplus/automation/examples/package-info.java
index 5a5f124..3a8d2e3 100644
--- a/src/main/java/org/cloudsimplus/automation/examples/package-info.java
+++ b/src/main/java/org/cloudsimplus/automation/examples/package-info.java
@@ -1,3 +1,25 @@
+/*
+ * CloudSim Plus Automation: A Human Readable Scenario Specification for Automated Creation of Simulations on CloudSim Plus.
+ * https://github.com/manoelcampos/CloudSimAutomation
+ *
+ * Copyright (C) 2015-2016 Universidade da Beira Interior (UBI, Portugal) and
+ * the Instituto Federal de Educação Ciência e Tecnologia do Tocantins (IFTO, Brazil).
+ *
+ * This file is part of CloudSim Automation.
+ *
+ * CloudSim Plus Automation is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * CloudSim Plus Automation is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with CloudSim Automation. If not, see .
+ */
@NullMarked
package org.cloudsimplus.automation.examples;