org.objectweb.proactive.core.group.topology
Class Ring

java.lang.Object
  |
  +--org.objectweb.proactive.core.body.proxy.AbstractProxy
        |
        +--org.objectweb.proactive.core.group.ProxyForGroup
              |
              +--org.objectweb.proactive.core.group.topology.TopologyGroup
                    |
                    +--org.objectweb.proactive.core.group.topology.Ring
All Implemented Interfaces:
java.util.Collection, Group, Proxy, java.io.Serializable
Direct Known Subclasses:
Torus

public class Ring
extends TopologyGroup

This class represents a group by a cycling one-dimensional topology.

Author:
Laurent Baduel
See Also:
Serialized Form

Field Summary
protected  int width
          size of the one-dimensional topology group
 
Fields inherited from class org.objectweb.proactive.core.group.ProxyForGroup
className, dispatching, logger, memberList, stub, uniqueSerialization, waited
 
Constructor Summary
Ring(Group g, int size)
          Construtor.
 
Method Summary
 int getWidth()
          Return the max size of the Ring
 int getX(java.lang.Object o)
          Returns the position of the specified object
 java.lang.Object left(java.lang.Object o)
          Returns the object at the left of the specified object in the one-dimensional topology group
 java.lang.Object right(java.lang.Object o)
          Returns the object at the right of the specified object in the one-dimensional topology group
 
Methods inherited from class org.objectweb.proactive.core.group.ProxyForGroup
add, addAll, addMerge, addToListOfResult, allArrived, allAwaited, asynchronousCallOnGroup, barrier, clear, contains, containsAll, createMemberWithMultithread, difference, display, equals, exclude, get, getExceptionList, getGroupByType, getType, getTypeName, hashCode, indexOf, intersection, isDispatchingOn, isEmpty, iterator, listIterator, oneWayCallOnGroup, purgeExceptionAndNull, range, reify, remove, remove, removeAll, retainAll, set, setDispatchingOff, setDispatchingOn, setRatioNemberToThread, setSPMDGroup, setUniqueSerializationOff, setUniqueSerializationOn, size, toArray, toArray, union, waitAll, waitAndGetOne, waitAndGetTheNth, waitN, waitOne, waitOneAndGetIndex, waitTheNth
 
Methods inherited from class org.objectweb.proactive.core.body.proxy.AbstractProxy
isAsynchronousCall, isOneWayCall
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

width

protected int width
size of the one-dimensional topology group

Constructor Detail

Ring

public Ring(Group g,
            int size)
     throws ConstructionOfReifiedObjectFailedException
Construtor. The members of g are used to fill the topology group.

Parameters:
g - - the group used a base for the new group (topology)
size - - the dimension (max number of member in the topolody group)
Throws:
ConstructionOfReifiedObjectFailedException
Method Detail

getWidth

public int getWidth()
Return the max size of the Ring

Returns:
the max size of the one-dimensional topology group (i.e. the Ring)

getX

public int getX(java.lang.Object o)
Returns the position of the specified object

Parameters:
o - - the object
Returns:
the position of the object in the Ring

left

public java.lang.Object left(java.lang.Object o)
Returns the object at the left of the specified object in the one-dimensional topology group

Parameters:
o - - the specified object
Returns:
the object at the left of o. If there is no object at the left of o, return null

right

public java.lang.Object right(java.lang.Object o)
Returns the object at the right of the specified object in the one-dimensional topology group

Parameters:
o - - the specified object
Returns:
the object at the right of o. If there is no object at the right of o, return null


Copyright © April 2004 INRIA All Rights Reserved.