|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.objectweb.proactive.core.group.ProActiveGroup
This class provides static methods to manage objects representing a Group (typed group).
The ProActiveGroup class provides a set of static services through static method calls.
It is the main entry point for users of ProActive Group Communication as they will call methods of this class
to create group of object or to synchronize them.
The main role of ProActiveGroup is to provide methods to create typed group. It is possible to create a typed
group (empty or not) through instantiation using one of the version of newActive.
It is also possible to create an active typed group from an existing using using the turnActive methods.
The default behavior is a broadcast call, with a unique serialization of parameters.
Warning !!! When a typed group is turned active, it looses the ability to switch to the
Group
representation. So an active typed group acquire the abilites of any active object
(remote reference, migration, ...) but is no more able to evolve : no modification of the membership is possible.
(This feature will may appear in a later version of ProActive group communication).
Field Summary | |
static java.lang.Class |
DEFAULT_PROXYFORGROUP_CLASS
The name of the default proxy for group communication |
static java.lang.String |
DEFAULT_PROXYFORGROUP_CLASS_NAME
The name of the default proxy for group communication |
protected static org.apache.log4j.Logger |
logger
The logger for the Class |
Method Summary | |
static boolean |
allArrived(java.lang.Object o)
Tests if all the member of the object o representing a group are arrived or not.
|
static boolean |
allAwaited(java.lang.Object o)
Tests if all the members of the object o representing a group are awaited or not.
|
static java.lang.Object |
captureView(java.lang.Object ogroup)
Gives a view of the group |
static java.lang.Object |
get(java.lang.Object o,
int n)
Returns the member at the specified index of the object representing a Group. |
static Group |
getGroup(java.lang.Object o)
Returns a Group corresponding to the Object o representing a group. |
static java.lang.String |
getType(java.lang.Object o)
Returns the name class of the typed group. |
static boolean |
isGroup(java.lang.Object o)
Checks if the object o is an object representing a Group (future or not). |
static boolean |
isScatterGroupOn(java.lang.Object ogroup)
Checks the semantic of communication of the typed group ogroup . |
static java.lang.Object |
newGroup(java.lang.String className)
Creates an object representing an empty group specifying the upper class of member. |
static java.lang.Object |
newGroup(java.lang.String className,
java.lang.Object[][] params)
Creates an object representing a group (a typed group) and creates members on the default node. |
static java.lang.Object |
newGroup(java.lang.String className,
java.lang.Object[][] params,
Node node)
Creates an object representing a group (a typed group) and creates all members with params on the node. |
static java.lang.Object |
newGroup(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 |
newGroup(java.lang.String className,
java.lang.Object[][] params,
java.lang.String nodeName)
Creates an object representing a group (a typed group) and creates all members with params on the node. |
static java.lang.Object |
newGroup(java.lang.String className,
java.lang.Object[][] params,
java.lang.String[] nodeListString)
Creates an object representing a group (a typed group) and creates members with params cycling on nodeList. |
static java.lang.Object |
newGroup(java.lang.String className,
java.lang.Object[][] params,
VirtualNode virtualNode)
Creates an object representing a group (a typed group) and creates members with params cycling on the nodes of the virtual node. |
static java.lang.Object |
newGroupBuildWithMultithreading(java.lang.String className,
java.lang.Object[][] params)
Creates an object representing a group (a typed group) and creates members on the default node. |
static java.lang.Object |
newGroupBuildWithMultithreading(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 |
newGroupBuildWithMultithreading(java.lang.String className,
java.lang.Object[][] params,
java.lang.String[] nodeList)
Creates an object representing a group (a typed group) and creates members with params cycling on nodeList. |
static java.lang.Object |
newGroupBuildWithMultithreading(java.lang.String className,
java.lang.Object[][] params,
VirtualNode virtualNode)
Creates an object representing a group (a typed group) and creates members with params cycling on the nodes of the vitual node. |
static void |
setScatterGroup(java.lang.Object ogroup)
Allows the typed group to dispatch parameters |
static void |
setUniqueSerialization(java.lang.Object ogroup)
Allows the typed group to make an unique serialization of parameters when a broadcast call occurs. |
static int |
size(java.lang.Object o)
Returns the number of members of the object representing a Group. |
static java.lang.Object |
turnActiveGroup(java.lang.Object ogroup)
Turns the target object (a typed group) into an ActiveObject (an active typed group) attached to a default node in the local JVM. |
static java.lang.Object |
turnActiveGroup(java.lang.Object ogroup,
Node node)
Turns the target object (a typed group) into an ActiveObject (an active typed group) attached to a specified node. |
static java.lang.Object |
turnActiveGroup(java.lang.Object ogroup,
java.lang.String nodeName)
Turns the target object (a typed group) into an ActiveObject (an active typed group) attached to a specified node. |
static void |
unsetScatterGroup(java.lang.Object ogroup)
Allows the typed group to broadcast parameters |
static void |
unsetUniqueSerialization(java.lang.Object ogroup)
Removes the ability of a typed group to make an unique serialization |
static void |
waitAll(java.lang.Object o)
Waits for all the futures are arrived. |
static java.lang.Object |
waitAndGetOne(java.lang.Object o)
Waits one future is arrived and get it. |
static java.lang.Object |
waitAndGetTheNth(java.lang.Object o,
int n)
Wait the N-th future is arrived and get it. |
static void |
waitN(java.lang.Object o,
int n)
Waits n futures are arrived. |
static void |
waitOne(java.lang.Object o)
Waits for (at least) one future is arrived. |
int |
waitOneAndGetIndex(java.lang.Object o)
Waits that at least one member is arrived and returns its index. |
static void |
waitTheNth(java.lang.Object o,
int n)
Wait the N-th future in the list is arrived. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static org.apache.log4j.Logger logger
public static final java.lang.Class DEFAULT_PROXYFORGROUP_CLASS
public static final java.lang.String DEFAULT_PROXYFORGROUP_CLASS_NAME
Method Detail |
public static Group getGroup(java.lang.Object o)
o
.public static java.lang.String getType(java.lang.Object o)
public static java.lang.Object newGroup(java.lang.String className) throws java.lang.ClassNotFoundException, ClassNotReifiableException
className
.
java.lang.ClassNotFoundException
- if the Class corresponding to className
can't be found.
ClassNotReifiableException
- if the Class corresponding to className
can't be reify.public static java.lang.Object newGroup(java.lang.String className, java.lang.Object[][] params) throws java.lang.ClassNotFoundException, ClassNotReifiableException, ActiveObjectCreationException, NodeException
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 createdpublic static java.lang.Object newGroup(java.lang.String className, java.lang.Object[][] params, java.lang.String nodeName) throws java.lang.ClassNotFoundException, ClassNotReifiableException, ActiveObjectCreationException, NodeException
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 createdpublic static java.lang.Object newGroup(java.lang.String className, java.lang.Object[][] params, java.lang.String[] nodeListString) throws java.lang.ClassNotFoundException, ClassNotReifiableException, ActiveObjectCreationException, NodeException
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 createdpublic static java.lang.Object newGroup(java.lang.String className, java.lang.Object[][] params, Node node) throws java.lang.ClassNotFoundException, ClassNotReifiableException, ActiveObjectCreationException, NodeException
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 createdpublic static java.lang.Object newGroup(java.lang.String className, java.lang.Object[][] params, Node[] nodeList) throws java.lang.ClassNotFoundException, ClassNotReifiableException, ActiveObjectCreationException, NodeException
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 createdpublic static java.lang.Object newGroup(java.lang.String className, java.lang.Object[][] params, VirtualNode virtualNode) throws java.lang.ClassNotFoundException, ClassNotReifiableException, ActiveObjectCreationException, NodeException
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 createdpublic static java.lang.Object turnActiveGroup(java.lang.Object ogroup) throws java.lang.ClassNotFoundException, ClassNotReifiableException, ActiveObjectCreationException, NodeException
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.public static java.lang.Object turnActiveGroup(java.lang.Object ogroup, Node node) throws java.lang.ClassNotFoundException, ClassNotReifiableException, ActiveObjectCreationException, NodeException
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 specified node can not be reached.public static java.lang.Object turnActiveGroup(java.lang.Object ogroup, java.lang.String nodeName) throws java.lang.ClassNotFoundException, ClassNotReifiableException, ActiveObjectCreationException, NodeException
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 specified node can not be reached.public static java.lang.Object newGroupBuildWithMultithreading(java.lang.String className, java.lang.Object[][] params) throws java.lang.ClassNotFoundException, ClassNotReifiableException, ActiveObjectCreationException, NodeException
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 createdpublic static java.lang.Object newGroupBuildWithMultithreading(java.lang.String className, java.lang.Object[][] params, Node[] nodeList) throws java.lang.ClassNotFoundException, ClassNotReifiableException, ActiveObjectCreationException, NodeException
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 createdpublic static java.lang.Object newGroupBuildWithMultithreading(java.lang.String className, java.lang.Object[][] params, java.lang.String[] nodeList) throws java.lang.ClassNotFoundException, ClassNotReifiableException, ActiveObjectCreationException, NodeException
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 createdpublic static java.lang.Object newGroupBuildWithMultithreading(java.lang.String className, java.lang.Object[][] params, VirtualNode virtualNode) throws java.lang.ClassNotFoundException, ClassNotReifiableException, ActiveObjectCreationException, NodeException
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 createdpublic static java.lang.Object captureView(java.lang.Object ogroup)
ogroup
- - a typed group
public static void waitAll(java.lang.Object o)
public static void waitOne(java.lang.Object o)
public static void waitN(java.lang.Object o, int n)
public static boolean allAwaited(java.lang.Object o)
o
representing a group are awaited or not.
Always returns false
if o
is not a reified object (future or group).
true
if all the members of o
are awaited.public static boolean allArrived(java.lang.Object o)
o
representing a group are arrived or not.
Always returns true
if o
is not a reified object (future or group).
true
if all the members of o
are arrived.public static java.lang.Object waitAndGetOne(java.lang.Object o)
o
.public static void waitTheNth(java.lang.Object o, int n)
public static java.lang.Object waitAndGetTheNth(java.lang.Object o, int n)
n
-th member of th typed group o
.public int waitOneAndGetIndex(java.lang.Object o)
o
is not a reified object.public static int size(java.lang.Object o)
o
doesn't represent a Group.
o
.public static java.lang.Object get(java.lang.Object o, int n)
null
if obj
doesn't represent a Group.
n
public static boolean isGroup(java.lang.Object o)
o
is an object representing a Group (future or not).
true
if o
is a typed group.public static void setScatterGroup(java.lang.Object ogroup)
public static void unsetScatterGroup(java.lang.Object ogroup)
public static void setUniqueSerialization(java.lang.Object ogroup)
public static void unsetUniqueSerialization(java.lang.Object ogroup)
public static boolean isScatterGroupOn(java.lang.Object ogroup)
ogroup
.
true
if the "scatter option" is enabled for the typed group ogroup
.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |