|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.objectweb.proactive.core.body.proxy.AbstractProxy | +--org.objectweb.proactive.core.group.ProxyForGroup
Field Summary | |
protected java.lang.String |
className
The name of the Class : all members of the group are "className" assignable |
protected boolean |
dispatching
Flag to deternime the semantic of communication (broadcast or dispatching) |
protected static org.apache.log4j.Logger |
logger
The logger for the Class |
protected java.util.Vector |
memberList
The list of member : it contains exclusively StubObjects connected to Proxies |
protected StubObject |
stub
The stub of the typed group |
protected boolean |
uniqueSerialization
Flag to deternime the semantic of communication (unique serialization of parameters or not) |
protected int |
waited
Number of awaited methodcall on the group's member. |
Constructor Summary | |
ProxyForGroup()
|
|
ProxyForGroup(ConstructorCall c,
java.lang.Object[] p)
|
|
ProxyForGroup(java.lang.String nameOfClass)
|
|
ProxyForGroup(java.lang.String nameOfClass,
java.lang.Integer size)
|
Method Summary | |
boolean |
add(java.lang.Object o)
If o is a reified object and if it is "assignableFrom" the class of the group, add it into the group - if o is a group merge it into the group - if o is not a reified object nor a group : do nothing |
boolean |
addAll(java.util.Collection c)
Adds all of the elements in the specified Collection to this Group. |
void |
addMerge(java.lang.Object oGroup)
Add all member of the group ogroup into the Group. |
protected void |
addToListOfResult(java.util.Vector memberListOfResultGroup,
java.lang.Object result,
int index)
Add the results (Future) into the typed group result at the correct poisition. |
boolean |
allArrived()
Checks if all the members of the Group are arrived. |
boolean |
allAwaited()
Checks if all the members of the Group are awaited. |
protected java.lang.Object |
asynchronousCallOnGroup(MethodCall mc)
Creates and initializes (and returns) the group of result, then launch threads for asynchronous call of each member. |
void |
barrier()
Strongly synchronizes all the members of the group |
void |
clear()
Removes all of the elements from this group. |
boolean |
contains(java.lang.Object o)
This method returns true if and only if this group contains at least one element e such that o.equals(e) |
boolean |
containsAll(java.util.Collection c)
Checks if this Group contains all of the elements in the specified collection. |
protected void |
createMemberWithMultithread(java.lang.String className,
java.lang.Object[][] params,
java.lang.String[] nodeList)
Builds the members using the threads (of the threadpool). |
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. |
void |
display()
To debug, display the size of the Group and all its members with there position |
boolean |
equals(java.lang.Object o)
Compares the specified object with this group for equality. |
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 i)
Returns the i-th member of the group. |
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 (a typed group Object) representing the Group |
java.lang.Class |
getType()
Returns the ("higher") Class of group's member. |
java.lang.String |
getTypeName()
Returns the full name of ("higher") Class of group's member |
int |
hashCode()
Returns the hash code value for this Group. |
int |
indexOf(java.lang.Object obj)
Returns the index of the first occurence of the specified Object obj . |
Group |
intersection(Group g)
Creates a new group with all members that belong to the group and to the group g . |
protected boolean |
isDispatchingOn()
Checks the semantic of communication of the Group. |
boolean |
isEmpty()
Check if the group is empty. |
java.util.Iterator |
iterator()
Returns an Iterator of the member in the Group. |
java.util.ListIterator |
listIterator()
Returns a list iterator of the members in this Group (in proper sequence). |
protected void |
oneWayCallOnGroup(MethodCall mc)
Launchs the threads for OneWay call of each member of the Group. |
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 . |
java.lang.Object |
reify(MethodCall mc)
The proxy's method : implements the semantic of communication. |
void |
remove(int index)
Removes the element at the specified position. |
boolean |
remove(java.lang.Object o)
Removes a single instance of the specified element from this Group, if it is present. |
boolean |
removeAll(java.util.Collection c)
Removes all this Group's elements that are also contained in the specified collection. |
boolean |
retainAll(java.util.Collection c)
Retains only the elements in this Group that are contained in the specified collection. |
protected void |
set(int index,
java.lang.Object o)
Sets an object to the specified position in the Group |
protected void |
setDispatchingOff()
Allows the Group to broadcast parameters. |
protected void |
setDispatchingOn()
Allows the Group to dispatch parameters. |
void |
setRatioNemberToThread(int i)
Modifies the number of members served by one thread |
void |
setSPMDGroup(java.lang.Object spmdGroup)
Communicates the SPMD Group to members |
protected void |
setUniqueSerializationOff()
Removes the ability of the Group to make an unique serialization of parameters.. |
protected void |
setUniqueSerializationOn()
Allows the Group to make an unique serialization of parameters. |
int |
size()
Returns the number of member in this Group. |
java.lang.Object[] |
toArray()
Returns an array containing all of the elements in this Group in the correct order. |
java.lang.Object[] |
toArray(java.lang.Object[] a)
Returns an array containing all of the elements in this collection; the runtime type of the returned array is that of the specified array. |
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 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 |
protected static org.apache.log4j.Logger logger
protected java.lang.String className
protected java.util.Vector memberList
protected int waited
protected boolean dispatching
protected boolean uniqueSerialization
protected StubObject stub
Constructor Detail |
public ProxyForGroup(java.lang.String nameOfClass) throws ConstructionOfReifiedObjectFailedException
public ProxyForGroup(java.lang.String nameOfClass, java.lang.Integer size) throws ConstructionOfReifiedObjectFailedException
public ProxyForGroup() throws ConstructionOfReifiedObjectFailedException
public ProxyForGroup(ConstructorCall c, java.lang.Object[] p) throws ConstructionOfReifiedObjectFailedException
Method Detail |
protected void setDispatchingOn()
protected void setDispatchingOff()
protected void setUniqueSerializationOn()
protected void setUniqueSerializationOff()
protected boolean isDispatchingOn()
true
if the "scatter option" is enabled.public java.lang.Object reify(MethodCall mc) throws java.lang.reflect.InvocationTargetException
mc
on each members of the Group.
reify
in interface Proxy
mc
- The MethodCall object corresponding to the method
java.lang.reflect.InvocationTargetException
- if a problem occurs when invoking the method on the members of the Groupprotected java.lang.Object asynchronousCallOnGroup(MethodCall mc)
protected void addToListOfResult(java.util.Vector memberListOfResultGroup, java.lang.Object result, int index)
protected void oneWayCallOnGroup(MethodCall mc)
public boolean add(java.lang.Object o)
add
in interface java.util.Collection
o
- - element whose presence in this group is to be ensured
true
if this collection changed as a result of the callpublic boolean addAll(java.util.Collection c)
addAll
in interface java.util.Collection
true
if this collection changed as a result of the call.public void clear()
clear
in interface java.util.Collection
public boolean contains(java.lang.Object o)
o.equals(e)
contains
in interface java.util.Collection
true
if this collection contains the specified element.public boolean containsAll(java.util.Collection c)
containsAll
in interface java.util.Collection
true
if this Group contains all of the elements in the specified collectionpublic boolean equals(java.lang.Object o)
equals
in interface java.util.Collection
equals
in class java.lang.Object
true
if o
is the same Group as this
.public int hashCode()
hashCode
in interface java.util.Collection
hashCode
in class java.lang.Object
public boolean isEmpty()
isEmpty
in interface java.util.Collection
true
if this collection contains no elements.public java.util.Iterator iterator()
iterator
in interface java.util.Collection
public boolean remove(java.lang.Object o)
o.equals(e)
returns true
.
remove
in interface java.util.Collection
true> if the Group contained the specified element.
public boolean removeAll(java.util.Collection c)
removeAll
in interface java.util.Collection
true
if this Group changed as a result of the callpublic boolean retainAll(java.util.Collection c)
retainAll
in interface java.util.Collection
true
if this Group changed as a result of the call.public int size()
size
in interface java.util.Collection
public java.lang.Object[] toArray()
toArray
in interface java.util.Collection
public java.lang.Object[] toArray(java.lang.Object[] a)
toArray
in interface java.util.Collection
public void addMerge(java.lang.Object oGroup)
ogroup
into the Group. ogroup
can be :
addMerge
in interface Group
public int indexOf(java.lang.Object obj)
obj
.
indexOf
in interface Group
obj
in the Group.
-1 if the list does not contain this object.public java.util.ListIterator listIterator()
listIterator
in interface Group
public void remove(int index)
remove
in interface Group
public java.lang.Object get(int i)
get
in interface Group
public java.lang.Class getType() throws java.lang.ClassNotFoundException
getType
in interface Group
java.lang.ClassNotFoundException
- if the class name of the Group is not known.public java.lang.String getTypeName()
getTypeName
in interface Group
public java.lang.Object getGroupByType()
getGroupByType
in interface Group
public Group union(Group g)
g
union
in interface Group
g
- - a group
g
. null if the class of the group is incompatible.
public Group intersection(Group g)
g
.
intersection
in interface Group
g
- - a group
g
. null if the class of the group is incompatible.
public Group exclude(Group g)
g
.
exclude
in interface Group
g
- - a group
g
. null if the class of the group is incompatible.
public Group difference(Group g)
g
, but not to both.
difference
in interface Group
g
- - a group
g
. null if the class of the group is incompatible.
public Group range(int begin, int end)
begin
and ending at the index end
.
range
in interface Group
begin
- - the begining indexend
- - the ending index
begin
to end
. null
if begin > end
.public void barrier()
barrier
in interface Group
public void setSPMDGroup(java.lang.Object spmdGroup)
spmdGroup
- - the SPMD grouppublic void display()
public void waitAll()
waitAll
in interface Group
public void waitOne()
waitOne
in interface Group
public void waitTheNth(int n)
waitTheNth
in interface Group
public void waitN(int n)
n
members are arrived.
waitN
in interface Group
public java.lang.Object waitAndGetOne()
waitAndGetOne
in interface Group
public java.lang.Object waitAndGetTheNth(int n)
waitAndGetTheNth
in interface Group
n
in the Group.public int waitOneAndGetIndex()
waitOneAndGetIndex
in interface Group
public boolean allAwaited()
allAwaited
in interface Group
true
if all the members of the Group are awaited.public boolean allArrived()
allArrived
in interface Group
true
if all the members of the Group are arrived.public ExceptionList getExceptionList()
getExceptionList
in interface Group
public void purgeExceptionAndNull()
purgeExceptionAndNull
in interface Group
public void setRatioNemberToThread(int i)
setRatioNemberToThread
in interface Group
i
- - the new ratioprotected void createMemberWithMultithread(java.lang.String className, java.lang.Object[][] params, java.lang.String[] nodeList)
protected void set(int index, java.lang.Object o)
index
- - the positiono
- - the object to add
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |