public class RMNodeImpl extends AbstractRMNode
NodeSource
,
and its state in the Resource Manager :SelectionScript
objects. Each node memorize results of executed scripts, in order to
answer faster to a selection already asked.NodeSource
,
SelectionScript
,
Serialized FormModifier and Type | Field and Description |
---|---|
static String |
NODE_HOST_BINDING |
static String |
NODE_NAME_BINDING |
static String |
NODE_TOKENS_BINDING |
static String |
NODE_URL_BINDING |
addEvent, isLocked, lastEvent, lockedBy, lockTime, nodeName, nodeSource, nodeSourceName, provider, state, stateChangeTime, usageInfo
Constructor and Description |
---|
RMNodeImpl(org.objectweb.proactive.core.node.Node node,
NodeSource nodeSource,
Client provider,
Permission nodeAccessPermission)
Constructs a new instance.
|
RMNodeImpl(org.objectweb.proactive.core.node.Node node,
NodeSource nodeSource,
Client provider,
Permission nodeAccessPermission,
NodeState state) |
RMNodeImpl(org.objectweb.proactive.core.node.Node node,
NodeSource nodeSource,
String nodeName,
String nodeUrl,
Client provider,
String hostName,
String[] jmxUrls,
String jvmName,
Permission nodeAccessPermission,
NodeState state,
Set<String> tags)
A constructor of
RMNodeImpl that already has all the
configuration information. |
Modifier and Type | Method and Description |
---|---|
void |
addToken(String token) |
void |
clean()
Clean the node.
|
int |
compareTo(RMNode rmnode) |
<T> ScriptResult<T> |
executeScript(Script<T> script,
Map<String,Serializable> bindings)
Execute a selection Script in order to test the Node.
|
Permission |
getAdminPermission()
Gets the permission which defines who can remove this node.
|
String |
getDescriptorVMName()
Returns the java virtual machine name of the RMNode.
|
ScriptHandler |
getHandler()
Returns the ProActive stub on the remote script handler.
|
String |
getHostName()
Returns the host name of the RMNode.
|
String |
getJMXUrl(JMXTransportProtocol protocol)
Gets the JMX url of the node.
|
String[] |
getJmxUrls()
Gets the JMX urls of the node.
|
org.objectweb.proactive.core.node.Node |
getNode()
Gives the node object related.
|
String |
getNodeInfo() |
Set<String> |
getNodeTags() |
List<String> |
getNodeTokens() |
Client |
getOwner()
Gets the owner of the node (who currently running computations on it)
|
HashMap<SelectionScript,Integer> |
getScriptStatus()
Gives the HashMap of all scripts tested with corresponding results.
|
Permission |
getUserPermission()
Gets the permission which defines who can user this node.
|
String |
getVNodeName()
Returns the Virtual node name of the RMNode.
|
boolean |
isBusy() |
boolean |
isConfiguring() |
boolean |
isDeploying()
Returns a boolean that says if the node is deploying or not.
|
boolean |
isDown() |
boolean |
isFree() |
boolean |
isProtectedByToken() |
boolean |
isToRemove() |
void |
removeToken(String token) |
void |
setBusy(Client owner)
Changes the state of this node to
NodeState.BUSY . |
void |
setBusy(Client owner,
Map<String,String> usageInfo) |
void |
setConfiguring(Client owner)
Changes the state of this node to
NodeState.CONFIGURING |
void |
setDown()
Changes the state of this node to
NodeState.DOWN . |
void |
setFree()
Changes the state of this node to
NodeState.FREE . |
void |
setJMXUrl(JMXTransportProtocol protocol,
String address)
Sets the jmx url of the node.
|
void |
setNodeTags(Set<String> tags) |
void |
setNodeTokens(String nodeUrl,
List<String> tokens) |
void |
setProtectedByToken(boolean protectedByToken) |
void |
setState(NodeState nodeState) |
void |
setToRemove()
Changes the state of this node to
NodeState.TO_BE_REMOVED . |
protected void |
updateProtectedByToken() |
changeState, copyLockStatusFrom, createNodeEvent, createNodeEvent, equals, getAddEvent, getLastEvent, getLockedBy, getLockStatus, getLockTime, getNodeName, getNodeSource, getNodeSourceName, getNodeURL, getProvider, getState, getStateChangeTime, getUsageInfo, hashCode, isLocked, lock, millisSinceStateChanged, setAddEvent, setLastEvent, setNodeSource, setStateChangeTime, setUsageInfo, toNodeDescriptor, toString, unlock
public static final String NODE_URL_BINDING
public static final String NODE_NAME_BINDING
public static final String NODE_HOST_BINDING
public static final String NODE_TOKENS_BINDING
public RMNodeImpl(org.objectweb.proactive.core.node.Node node, NodeSource nodeSource, Client provider, Permission nodeAccessPermission)
NodeState.FREE
.node
- ProActive node deployed.nodeSource
- NodeSource
Stub of NodeSource that handles the Node.provider
- the client who deployed the Node.nodeAccessPermission
- the permissions associated with the Node.public RMNodeImpl(org.objectweb.proactive.core.node.Node node, NodeSource nodeSource, Client provider, Permission nodeAccessPermission, NodeState state)
public RMNodeImpl(org.objectweb.proactive.core.node.Node node, NodeSource nodeSource, String nodeName, String nodeUrl, Client provider, String hostName, String[] jmxUrls, String jvmName, Permission nodeAccessPermission, NodeState state, Set<String> tags)
RMNodeImpl
that already has all the
configuration information.public org.objectweb.proactive.core.node.Node getNode()
RMNode
RMNode.getNode()
public String getVNodeName()
public String getHostName()
public String getDescriptorVMName()
public void setBusy(Client owner)
NodeState.BUSY
.public void setFree()
NodeState.FREE
.public void setConfiguring(Client owner)
NodeState.CONFIGURING
public void setDown()
NodeState.DOWN
.public void setToRemove()
NodeState.TO_BE_REMOVED
.public boolean isFree()
public boolean isBusy()
public boolean isDown()
public boolean isToRemove()
public boolean isConfiguring()
public String getNodeInfo()
public ScriptHandler getHandler() throws org.objectweb.proactive.core.node.NodeException
org.objectweb.proactive.core.node.NodeException
public <T> ScriptResult<T> executeScript(Script<T> script, Map<String,Serializable> bindings)
T
- The parameterized result type of the scriptscript
- Selection script to executebindings
- bindings to use to execute the selection scriptspublic void clean() throws org.objectweb.proactive.core.node.NodeException
org.objectweb.proactive.core.node.NodeException
public HashMap<SelectionScript,Integer> getScriptStatus()
public int compareTo(RMNode rmnode)
rmnode
- the RMNode object to compareComparable.compareTo(java.lang.Object)
public void setState(NodeState nodeState)
public Client getOwner()
public Permission getUserPermission()
public Permission getAdminPermission()
public void setJMXUrl(JMXTransportProtocol protocol, String address)
protocol
- protocol to be used for accessing the nodeaddress
- url of the jmx serverpublic String getJMXUrl(JMXTransportProtocol protocol)
RMNode
protocol
- protocol to be used for accessing the nodepublic String[] getJmxUrls()
RMNode
public boolean isProtectedByToken()
public void setProtectedByToken(boolean protectedByToken)
public boolean isDeploying()
RMNode
true
if the node is an instance of RMDeployingNode
,
false
if it is an instance of RMNodeImpl
.public void addToken(String token)
public void removeToken(String token)
protected void updateProtectedByToken()