and.Mapping
Class Mapping

java.lang.Object
  extended by and.Mapping.Mapping
All Implemented Interfaces:
java.io.Serializable

public class Mapping
extends java.lang.Object
implements java.io.Serializable

Class representing the tasks mapping on clusters and/or nodes

See Also:
Serialized Form

Constructor Summary
Mapping()
          Default constructor
 
Method Summary
 void addMapping(Association _a)
          Add a mapping association in the general mapping.
 void addMapping(Cluster c, java.util.ArrayList<GTask> at)
          Add in the mapping an association between a cluster and tasks set.
 int calcDepExt()
          Return the amount of external tasks dependencies, in cluster point of view.
 java.util.ArrayList<GNode> getMappedGNodes()
          Return the list of GNodes on which tasks are mapped, in order of the task number.
 java.util.ArrayList<Association> getMapping()
          Return the mapping done.
 void initMapping()
          Initialization of the Mapping variables
 void insertMapping(Association _a)
          Insert the association at the right place.
 void print()
          Print the status of the mapping done, according to its type.
 GTask removeGNode(GNode _deadNode)
          Remove a failed node from the mapping.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Mapping

public Mapping()
Default constructor

Method Detail

initMapping

public void initMapping()
Initialization of the Mapping variables


addMapping

public void addMapping(Cluster c,
                       java.util.ArrayList<GTask> at)
Add in the mapping an association between a cluster and tasks set.

Parameters:
c - Cluster of the association
at - Tasks set to be associated

addMapping

public void addMapping(Association _a)
Add a mapping association in the general mapping.

Parameters:
_a - Association between a task and a node

insertMapping

public void insertMapping(Association _a)
Insert the association at the right place.

Parameters:
_a - The association to be inserted

removeGNode

public GTask removeGNode(GNode _deadNode)
Remove a failed node from the mapping.

Parameters:
_deadNode - The failed node
Returns:
The task associated with the failed node

getMappedGNodes

public java.util.ArrayList<GNode> getMappedGNodes()
Return the list of GNodes on which tasks are mapped, in order of the task number.

Returns:
The ordered list, according to the GTasks id, of GNodes involved in the mapping

print

public void print()
Print the status of the mapping done, according to its type.


getMapping

public java.util.ArrayList<Association> getMapping()
Return the mapping done.

Returns:
The mapping

calcDepExt

public int calcDepExt()
Return the amount of external tasks dependencies, in cluster point of view.

Returns:
The amount of external dependencies