and.Mapping
Class Algo

java.lang.Object
  extended by and.Mapping.Algo
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
DefaultMapping, LSM, QM, Simple

public abstract class Algo
extends java.lang.Object
implements java.io.Serializable

Abstract class defining the structure for mapping algorithms

See Also:
Serialized Form

Field Summary
protected  Grid gl
           
protected  Graph gr
           
protected  Mapping mp
           
 
Constructor Summary
Algo()
          Default constructor.
Algo(Graph _gr, Grid _gl)
          Constructor.
 
Method Summary
 Mapping getMapping()
          Return mapping done.
abstract  GNode getOtherGNode(java.util.ArrayList<GNode> _ag)
          Find a new node, which may not takes part into the computation process.
abstract  void map()
          Mapping function.
abstract  GNode replaceNode(GNode _dead, java.util.ArrayList<GNode> _ag)
          Replace a fallen node by a new one, according to the mapping policy.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

gr

protected Graph gr

gl

protected Grid gl

mp

protected Mapping mp
Constructor Detail

Algo

public Algo()
Default constructor.


Algo

public Algo(Graph _gr,
            Grid _gl)
Constructor.

Parameters:
_gr - Tasks graph to be mapped
_gl - Grid graph
Method Detail

map

public abstract void map()
Mapping function.


replaceNode

public abstract GNode replaceNode(GNode _dead,
                                  java.util.ArrayList<GNode> _ag)
Replace a fallen node by a new one, according to the mapping policy.

Parameters:
_dead - The fallen node to be replaced
_ag - The list of all available computing nodes
Returns:
The new node

getOtherGNode

public abstract GNode getOtherGNode(java.util.ArrayList<GNode> _ag)
Find a new node, which may not takes part into the computation process. Typically such kind of node is used to create a new spawner or a new super-node, in order to bring fault tolerance.

Returns:
Another node which will not compute

getMapping

public Mapping getMapping()
Return mapping done.

Returns:
The mapping done