|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.proactive.core.event.AbstractEventProducer
org.objectweb.proactive.core.event.NodeCreationEventProducerImpl
org.objectweb.proactive.core.descriptor.data.VirtualNodeImpl
A VirtualNode
is a conceptual entity that represents one or several nodes. After activation
a VirtualNode
represents one or several nodes.
ProActiveDescriptor
,
VirtualMachine
,
Serialized FormNested Class Summary |
Nested classes inherited from class org.objectweb.proactive.core.event.AbstractEventProducer |
AbstractEventProducer.ListenerList |
Field Summary | |
static int |
counter
|
protected long |
globalTimeOut
represents the sum of the timeout + current time in ms |
protected java.lang.String |
jobID
|
protected ProActiveRuntimeImpl |
proActiveRuntimeImpl
Reference on the local runtime |
protected long |
timeout
represents the timeout in ms |
Fields inherited from class org.objectweb.proactive.core.event.AbstractEventProducer |
eventListeners, logger, shouldSerializeListeners |
Fields inherited from interface org.objectweb.proactive.core.descriptor.data.VirtualNode |
vnLogger |
Method Summary | |
void |
activate()
Activates all the Nodes mapped to this VirtualNode in the XML Descriptor |
void |
addFileTransferDeploy(FileTransfer ft)
|
void |
addFileTransferRetrieve(FileTransfer ft)
|
void |
addP2PNodesLookup(P2PNodeLookup nodesLookup)
|
void |
addVirtualMachine(VirtualMachine virtualMachine)
Adds a VirtualMachine entity to this VirtualNode |
int |
createdNodeCount()
Deprecated. use getNumberOfCurrentlyCreatedNodes() or getNumberOfCreatedNodesAfterDeployment() instead |
void |
createNodeOnCurrentJvm(java.lang.String protocol)
Creates a node with the given protocol(or null) on the current jvm, ie the jvm that originates the creation of this VirtualNode. |
java.lang.String |
getJobID()
|
int |
getMinNumberOfNodes()
Returns the minimum number of nodes needed for this VirtualNode. |
java.lang.String |
getName()
Returns the name of this VirtualNode |
Node |
getNode()
Returns the first Node created among Nodes mapped to this VirtualNode in the XML Descriptor Another call to this method will return the following created node if any. |
Node |
getNode(int index)
Returns the Node mapped to this VirtualNode with the specified index. |
Node |
getNode(java.lang.String url)
Returns the node of the given url among nodes mapped to this VirtualNode in the xml descriptor or null if such node does not exist. |
int |
getNodeCount()
Returns the number of Nodes mapped to this VirtualNode in the XML Descriptor |
Node[] |
getNodes()
Returns all nodes mapped to this VirtualNode |
java.lang.String[] |
getNodesURL()
Returns all nodes url mapped to this VirualNode |
int |
getNumberOfCreatedNodesAfterDeployment()
Returns the number of Nodes that could successfully be created at the end of the deployment |
int |
getNumberOfCurrentlyCreatedNodes()
Returns the number of Nodes already created (at the time of the reception of method call) among the Nodes mapped to this VirtualNode in the XML Descriptor |
java.lang.String |
getPadURL()
return the url of the proactive descriptor which created this VN |
java.lang.String |
getProperty()
Returns the value of property attribute. |
java.lang.String |
getRegistrationProtocol()
|
long |
getTimeout()
Returns the timeout of this VirtualNode |
java.lang.Object |
getUniqueAO()
Returns the unique active object created on the unique node mapped to this VirtualNode. |
java.lang.String |
getUserClass()
Returns the real class of the service user |
VirtualMachine |
getVirtualMachine()
Returns the virtualMachine entity linked to this VirtualNode or if cyclic, returns one of the VirtualMachines linked to this VirtualNode with a cyclic manner(internal count incremented each time this method is called). |
boolean |
isActivated()
Returns true is this VirtualNode is already activated, false otherwise |
boolean |
isLookup()
|
boolean |
isMainVirtualNode()
return true if the virtual node represents a node with a main method |
boolean |
isMultiple()
checks the cardinality of the virtual node (i.e. whether the node is mapped to several nodes or not) |
void |
killAll(boolean softly)
Kills all nodes mapped to this VirtualNode. |
void |
nodeCreated(NodeCreationEvent event)
Use for p2p infrastructure to get nodes. |
void |
runtimeRegistered(RuntimeRegistrationEvent event)
Signals that a registration occured on the runtime encapsulated in the event |
void |
setIsMainVirtualNode(boolean isMainVirtualNode)
set tha main property of this VN |
void |
setMinNumberOfNodes(int min)
Sets the minimal number of nodes this VirtualNode needs to be suitable for the application. |
void |
setName(java.lang.String s)
Sets the name of this VirtualNode |
void |
setPadURL(java.lang.String XMLpadURL)
set the url of the pad |
void |
setProperty(java.lang.String value)
Sets the property attribute to the given value |
void |
setRegistrationProtocol(java.lang.String protocol)
|
void |
setRuntimeInformations(java.lang.String information,
java.lang.String value)
Allows to set runtime informations for this VirtualNode activation. |
void |
setService(UniversalService service)
Sets the given service |
void |
setTimeout(long timeout,
boolean waitForTimeout)
Sets the timeout variable to the given value. |
void |
waitForAllNodesCreation()
Waits until all Nodes mapped to this VirtualNode in the XML Descriptor are created |
Methods inherited from class org.objectweb.proactive.core.event.NodeCreationEventProducerImpl |
addNodeCreationEventListener, notifyListeners, notifyOneListener, removeNodeCreationEventListener |
Methods inherited from class org.objectweb.proactive.core.event.AbstractEventProducer |
addListener, hasListeners, notifyAllListeners, removeListener |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static int counter
protected transient ProActiveRuntimeImpl proActiveRuntimeImpl
protected long timeout
protected long globalTimeOut
protected java.lang.String jobID
Method Detail |
public void setProperty(java.lang.String value)
value
- property the value of property attribute, this value can be "unique", "unique_singleAO", "multiple", "multiple_cyclic" or nothingpublic java.lang.String getProperty()
VirtualNode
getProperty
in interface VirtualNode
public long getTimeout()
VirtualNode
getTimeout
in interface VirtualNode
public void setTimeout(long timeout, boolean waitForTimeout)
timeout
- the timeout to set in mswaitForTimeout
- to force or not this VirtualNode to wait untile timeout's expirationpublic void setName(java.lang.String s)
s
- the name of this Virtual Nodepublic java.lang.String getName()
VirtualNode
getName
in interface VirtualNode
public void addVirtualMachine(VirtualMachine virtualMachine)
VirtualNode
addVirtualMachine
in interface VirtualNode
virtualMachine
- public void addFileTransferDeploy(FileTransfer ft)
public void addFileTransferRetrieve(FileTransfer ft)
public VirtualMachine getVirtualMachine()
VirtualNode
getVirtualMachine
in interface VirtualNode
public void activate()
activate
in interface VirtualNode
public boolean isMainVirtualNode()
public java.lang.String getPadURL()
public void setIsMainVirtualNode(boolean isMainVirtualNode)
isMainVirtualNode
- public void setPadURL(java.lang.String XMLpadURL)
XMLpadURL
- url of the padpublic int getNodeCount()
getNodeCount
in interface VirtualNode
public int createdNodeCount()
getNumberOfCurrentlyCreatedNodes()
or getNumberOfCreatedNodesAfterDeployment()
instead
createdNodeCount
in interface VirtualNode
public int getNumberOfCurrentlyCreatedNodes()
VirtualNode
getNumberOfCurrentlyCreatedNodes
in interface VirtualNode
public int getNumberOfCreatedNodesAfterDeployment()
VirtualNode
getNumberOfCreatedNodesAfterDeployment
in interface VirtualNode
public Node getNode() throws NodeException
getNode
in interface VirtualNode
NodeException
public Node getNode(int index) throws NodeException
VirtualNode
getNode
in interface VirtualNode
index
-
NodeException
public java.lang.String[] getNodesURL() throws NodeException
VirtualNode
getNodesURL
in interface VirtualNode
NodeException
public Node[] getNodes() throws NodeException
VirtualNode
getNodes
in interface VirtualNode
NodeException
public Node getNode(java.lang.String url) throws NodeException
VirtualNode
getNode
in interface VirtualNode
url
-
NodeException
public void killAll(boolean softly)
VirtualNode
killAll
in interface VirtualNode
softly
- if false, all jvms created when activating this VirtualNode are killed abruptely
if true a jvm that originates the creation of a rmi registry waits until registry is empty before
dying. To be more precise a thraed is created to ask periodically the registry if objects are still
registered.public void createNodeOnCurrentJvm(java.lang.String protocol)
VirtualNode
createNodeOnCurrentJvm
in interface VirtualNode
protocol
- the protocol to create the node. If null protocol will be set to the system property: proactive.communication.protocol.public java.lang.Object getUniqueAO() throws ProActiveException
VirtualNode
getUniqueAO
in interface VirtualNode
ProActiveException
- if no active objects are created on this VirtualNode.public boolean isActivated()
VirtualNode
isActivated
in interface VirtualNode
public boolean isLookup()
isLookup
in interface VirtualNode
VirtualNode.isLookup()
public java.lang.String getJobID()
getJobID
in interface Job
Job.getJobID()
public void runtimeRegistered(RuntimeRegistrationEvent event)
RuntimeRegistrationEventListener
runtimeRegistered
in interface RuntimeRegistrationEventListener
event
- the creation event that details the registration on the runtimepublic void setRuntimeInformations(java.lang.String information, java.lang.String value) throws ProActiveException
VirtualNode
lookup virtualNode="vnName" host="*" protocol="rmi or jini", ie the name of the host where to perform the lookup will be known at runtime.We expect to implement several runtime informations. If this method fails, for instance, if the property does not exist or has already been set, or is performed on a VirtualNode not resulting from a lookup, an exception will be thrown but the application will carry on.
setRuntimeInformations
in interface VirtualNode
information
- the information to be set at runtimevalue
- the value of the information
ProActiveException
- if the given information does not exist or has alredy been setAt the moment no property can be set at runtime on a VirtualNodeImpl.
public void setService(UniversalService service) throws ProActiveException
ServiceUser
setService
in interface ServiceUser
service
- the service to set
ProActiveException
- if the given service cannot be set on the user objectServiceUser.setService(org.objectweb.proactive.core.descriptor.services.UniversalService)
public java.lang.String getUserClass()
ServiceUser
getUserClass
in interface ServiceUser
ServiceUser.getUserClass()
public void setRegistrationProtocol(java.lang.String protocol)
public java.lang.String getRegistrationProtocol()
public void setMinNumberOfNodes(int min)
min
- the minimum number of nodespublic int getMinNumberOfNodes()
VirtualNode
getMinNumberOfNodes
in interface VirtualNode
VirtualNode.getMinNumberOfNodes()
public boolean isMultiple()
VirtualNode
isMultiple
in interface VirtualNode
VirtualNode.isMultiple()
public void waitForAllNodesCreation() throws NodeException
NodeException
public void nodeCreated(NodeCreationEvent event)
nodeCreated
in interface NodeCreationEventListener
event
- that details the creation of the nodeNodeCreationEventListener.nodeCreated(org.objectweb.proactive.core.event.NodeCreationEvent)
public void addP2PNodesLookup(P2PNodeLookup nodesLookup)
nodesLookup
-
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |