org.objectweb.proactive.core.group
Interface Group

All Superinterfaces:
java.util.Collection
All Known Implementing Classes:
ProxyForGroup

public interface Group
extends java.util.Collection

This interface presents the group abilities extending java.util.Collection.

Author:
Laurent Baduel
See Also:
Collection

Method Summary
 void addMerge(java.lang.Object ogroup)
          Merges a group into the group.
 boolean allArrived()
          Checks if all the members of the Group are arrived.
 boolean allAwaited()
          Checks if all the members of the Group are awaited.
 void barrier()
          Strongly synchronizes all the members of the group
 Group difference(Group g)
          Creates a new group with all members that belong to the group or to the group g, but not to both.
 Group exclude(Group g)
          Creates a new group with the members that belong to the group, but not to the group g.
 java.lang.Object get(int index)
          Returns the object at the specified index.
 ExceptionList getExceptionList()
          Returns an ExceptionList containing all the throwables (exceptions and errors) occured when this group was built
 java.lang.Object getGroupByType()
          Returns an object representing the group, and assignable from the (upper) class of member.
 java.lang.Class getType()
          Returns the (upper) class of member.
 java.lang.String getTypeName()
          Returns the name of the (upper) class of member.
 int indexOf(java.lang.Object obj)
          Returns the index in the group of the first occurence of the specified element, -1 if the list does not contain this element.
 Group intersection(Group g)
          Creates a new group with all members that belong to the group and to the group g.
 java.util.ListIterator listIterator()
          Returns a list iterator of the members in this Group (in proper sequence).
 void purgeExceptionAndNull()
          Removes all exceptions and null references contained in the Group.
 Group range(int begin, int end)
          Creates a new group with the members of the group begining at the index begin and ending at the index end.
 void remove(int index)
          Removes the object at the specified index.
 void setRatioNemberToThread(int i)
          Modifies the number of members served by one thread
 Group union(Group g)
          Creates a new group with all members of the group and all the members of the group g
 void waitAll()
          Waits that all the members are arrived.
 java.lang.Object waitAndGetOne()
          Waits that at least one member is arrived and returns it.
 java.lang.Object waitAndGetTheNth(int n)
          Waits that the member at the specified rank is arrived and returns it.
 void waitN(int n)
          Waits that at least n members are arrived.
 void waitOne()
          Waits that at least one member is arrived.
 int waitOneAndGetIndex()
          Waits that at least one member is arrived and returns its index.
 void waitTheNth(int n)
          Waits that the member at the specified rank is arrived.
 
Methods inherited from interface java.util.Collection
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 

Method Detail

getType

public java.lang.Class getType()
                        throws java.lang.ClassNotFoundException
Returns the (upper) class of member.

java.lang.ClassNotFoundException

getTypeName

public java.lang.String getTypeName()
Returns the name of the (upper) class of member.


getGroupByType

public java.lang.Object getGroupByType()
Returns an object representing the group, and assignable from the (upper) class of member.


get

public java.lang.Object get(int index)
Returns the object at the specified index.


addMerge

public void addMerge(java.lang.Object ogroup)
Merges a group into the group.


remove

public void remove(int index)
Removes the object at the specified index.


indexOf

public int indexOf(java.lang.Object obj)
Returns the index in the group of the first occurence of the specified element, -1 if the list does not contain this element.


listIterator

public java.util.ListIterator listIterator()
Returns a list iterator of the members in this Group (in proper sequence).


waitAll

public void waitAll()
Waits that all the members are arrived.


waitOne

public void waitOne()
Waits that at least one member is arrived.


waitTheNth

public void waitTheNth(int n)
Waits that the member at the specified rank is arrived.


waitN

public void waitN(int n)
Waits that at least n members are arrived.


waitAndGetOne

public java.lang.Object waitAndGetOne()
Waits that at least one member is arrived and returns it.

Returns:
a non-awaited member of the Group.

waitAndGetTheNth

public java.lang.Object waitAndGetTheNth(int n)
Waits that the member at the specified rank is arrived and returns it.

Returns:
the member (non-awaited) at the rank n in the Group.

waitOneAndGetIndex

public int waitOneAndGetIndex()
Waits that at least one member is arrived and returns its index.

Returns:
the index of a non-awaited member of the Group.

allAwaited

public boolean allAwaited()
Checks if all the members of the Group are awaited.

Returns:
true if all the members of the Group are awaited.

allArrived

public boolean allArrived()
Checks if all the members of the Group are arrived.

Returns:
true if all the members of the Group are arrived.

getExceptionList

public ExceptionList getExceptionList()
Returns an ExceptionList containing all the throwables (exceptions and errors) occured when this group was built

Returns:
an ExceptionList

purgeExceptionAndNull

public void purgeExceptionAndNull()
Removes all exceptions and null references contained in the Group. Exceptions (and null references) appears with communication/program-level/runtime errors and are stored in the Group. (After this operation the size of the Group decreases)


setRatioNemberToThread

public void setRatioNemberToThread(int i)
Modifies the number of members served by one thread

Parameters:
i - - the new ratio

union

public Group union(Group g)
Creates a new group with all members of the group and all the members of the group g

Parameters:
g - - a group
Returns:
a group that contain all the members of the group and g. null if the class of the group is incompatible.

intersection

public Group intersection(Group g)
Creates a new group with all members that belong to the group and to the group g.

Parameters:
g - - a group
Returns:
a group that contain the common members of the group and g. null if the class of the group is incompatible.

difference

public Group difference(Group g)
Creates a new group with all members that belong to the group or to the group g, but not to both.

Parameters:
g - - a group
Returns:
a group that contain the non-common members of the group and g. null if the class of the group is incompatible.

exclude

public Group exclude(Group g)
Creates a new group with the members that belong to the group, but not to the group g.

Parameters:
g - - a group
Returns:
a group that contain the members of the group without the member g. null if the class of the group is incompatible.

range

public Group range(int begin,
                   int end)
Creates a new group with the members of the group begining at the index begin and ending at the index end.

Parameters:
begin - - the begining index
end - - the ending index
Returns:
a group that contain the members of the group from begin to end. null if begin > end.

barrier

public void barrier()
Strongly synchronizes all the members of the group



Copyright © April 2004 INRIA All Rights Reserved.