Commit 9ab8fe4b authored by esabate's avatar esabate

README updated accordingly to the changes applied in the model. Changes in...

README updated accordingly to the changes applied in the model. Changes in Worker and Node to fulfill best-practices
parent 4737f432
......@@ -8,29 +8,32 @@ This model is used to communicate the NFR tool with the COMPSs orchestrator. The
Registered model has the following representation:
```
+---------------------+
| |
| Master |
| |
+-------------------+ +---------------------+
| |1 1| | +--------------------+
| Application +<------>+ - PID |* 1| |
| | | +<------->+ Node |
+-------------------+ +---------------------+ | |
| | +--------------------+
| - String name |1 *----------------------+ | |
| +<------>+ |* 1| - name |
+---------+---------+ | Worker +<------->+ - address |
^* | | | - cpuCapacity |
| +---------------------+ | - energyCapacity |
|1 | | +--------+-----------+
+---------+---------+ | - PID | ^*
| | | - address | |
| ElasticSystem | | - active | |
| | | | |
+-------------------+ +---------------------+ |
| |1 |
| +<------------------------------------------------+
+---------------------+
| |
| Master |
| |
+----------------------+ +---------------------+
| |1 1| | +--------------------------+
| COMPSsApplication +<------>+ - int PID |* 1| |
| | | +<------->+ Node |
+----------------------+ +---------------------+ | |
| | +--------------------------+
| - String name |1 *----------------------+ | |
| - String uuid +<------>+ |* 1| - String name |
| - bool isSecure | | Worker | | - int cpuCapacity |
| - String infoNature | | +---------+ - int energyCapacity |
| | +---------------------+ | - int communicationCost |
+---------+------------+ | | | |
^* | - int PID | +--------------------------+
| | - boolean active | ^*
|1 | | |
+---------+---------+ +---------------------+ |
| | |
| ElasticSystem | |
| | |
+-------------------+ |
| |1 |
| +<-------------------------------------------------------+
+---------+---------+
```
......
......@@ -34,11 +34,11 @@ public class Node extends DataClayObject {
* @param cpuCapacity Capacity of the CPU
* @param energyCapacity Energy capacity of the node
*/
public Node(final String name, final int cpuCapacity, final int energyCapacity) {
public Node(final String name, final int cpuCapacity, final int energyCapacity, final int communicationCost) {
this.name = name;
this.cpuCapacity = cpuCapacity;
this.energyCapacity = energyCapacity;
this.communicationCost = 0;
this.communicationCost = communicationCost;
}
/**
......
......@@ -25,11 +25,12 @@ public class Worker extends DataClayObject {
* @param node Node containing the process
* @param pid Worker process PID
*/
public Worker(final Node node, final int pid, final boolean active) {
public Worker(final Node node, final int pid, final boolean active, final Application app) {
this.node = node;
this.pid = pid;
this.active = active;
node.addWorker(this);
this.app = app;
}
/**
......
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