org.objectweb.proactive.core.group.spmd
Class ProSPMD

java.lang.Object
  |
  +--org.objectweb.proactive.core.group.spmd.ProSPMD

public class ProSPMD
extends java.lang.Object

This class provides a static method to build (an deploy) an 'SPMD' group of active objects with all references between them to communicate.

For instance, the following code builds objects of type A on nodes node1,node2,..., with parameters param1,param2,... and build for each object created its diffusion group to communicate with the others.

 Object[] params = {param1,param2,...};
 Node[] nodes = {node1,node2,...};

 A group  =  (A) ProSPMD.newSPMDGroup("A", params, nodes);
 

Since:
ProActive 1.0.3
Version:
1.0, 2003/10/09
Author:
Laurent Baduel

Constructor Summary
ProSPMD()
           
 
Method Summary
 int getMyRank()
          Returns the rank (position) of the object in the Group
 int getMySPMDGroupSize()
          Returns the size of the SPMD group of this
static java.lang.Object getSPMDGroup()
          Returns the SPMD group of this
static java.lang.Object newSPMDGroup(java.lang.String className, java.lang.Object[][] params, Node[] nodeList)
          Creates an object representing a group (a typed group) and creates members with params cycling on nodeList.
static java.lang.Object newSPMDGroup(java.lang.String className, java.lang.Object[][] params, java.lang.String[] nodeList)
           
static void setSPMDGroupOnThis(java.lang.Object o)
          Set the SPMD group for this
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProSPMD

public ProSPMD()
Method Detail

newSPMDGroup

public static java.lang.Object newSPMDGroup(java.lang.String className,
                                            java.lang.Object[][] params,
                                            Node[] nodeList)
                                     throws java.lang.ClassNotFoundException,
                                            ClassNotReifiableException,
                                            ActiveObjectCreationException,
                                            NodeException
Creates an object representing a group (a typed group) and creates members with params cycling on nodeList. This object represents the set of activities.

Returns:
a typed group with its members.
Throws:
ActiveObjectCreationException - if a problem occur while creating the stub or the body
java.lang.ClassNotFoundException - if the Class corresponding to className can't be found.
ClassNotReifiableException - if the Class corresponding to className can't be reify.
NodeException - if the node was null and that the DefaultNode cannot be created

newSPMDGroup

public static java.lang.Object newSPMDGroup(java.lang.String className,
                                            java.lang.Object[][] params,
                                            java.lang.String[] nodeList)
                                     throws java.lang.ClassNotFoundException,
                                            ClassNotReifiableException,
                                            ActiveObjectCreationException,
                                            NodeException
java.lang.ClassNotFoundException
ClassNotReifiableException
ActiveObjectCreationException
NodeException

setSPMDGroupOnThis

public static void setSPMDGroupOnThis(java.lang.Object o)
Set the SPMD group for this

Parameters:
o - - the new SPMD group

getSPMDGroup

public static java.lang.Object getSPMDGroup()
Returns the SPMD group of this

Returns:
the SPMD group of this

getMySPMDGroupSize

public int getMySPMDGroupSize()
Returns the size of the SPMD group of this

Returns:
a size (int)

getMyRank

public int getMyRank()
Returns the rank (position) of the object in the Group

Returns:
the index of the object


Copyright © April 2004 INRIA All Rights Reserved.