public class RMProxyUserInterface extends RMListenerProxy implements ResourceManager
RMListenerProxy.init(String, Credentials)
method
after having created itModifier and Type | Class and Description |
---|---|
static class |
RMProxyUserInterface.MBeanAttributeType
Enum of managed MBean attribute types
Convert a String MBean attribute value to Object
|
counter, credentials, jmxClient, logger, MONITORING_INTERFACE_TIMEOUT, nodeConnector, nodeConnectorUrl, rmAuth, rmInitialState, RMstate, target
Constructor and Description |
---|
RMProxyUserInterface() |
Modifier and Type | Method and Description |
---|---|
org.objectweb.proactive.core.util.wrapper.BooleanWrapper |
acquireNodes(String sourceName,
int numberNodes,
long timeout,
Map<String,?> nodeConfiguration)
Acquires new nodes in the particular node source.
|
org.objectweb.proactive.core.util.wrapper.BooleanWrapper |
addNode(String arg0)
Adds an existing node to the default node source of the resource manager.
|
org.objectweb.proactive.core.util.wrapper.BooleanWrapper |
addNode(String arg0,
String arg1)
Adds an existing node to the particular node source.
|
void |
addNodeToken(String nodeUrl,
String token)
Add a token to the given node
|
boolean |
areNodesKnown(NodeSet nodes)
Check whether the nodes in the given node set are known by the resource
manager
|
Map<String,Boolean> |
areNodesRecoverable(NodeSet nodes)
Check whether the nodes in the given node set can be recovered in case
of a crash
|
org.objectweb.proactive.core.util.wrapper.BooleanWrapper |
checkNodePermission(String nodeUrl,
boolean provider)
Check is the user has admin permission for the given node or it is a node source provider
|
org.objectweb.proactive.core.util.wrapper.BooleanWrapper |
checkNodeSourcePermission(String nodeSourceName,
boolean provider)
Check is the user has admin permission for the given node source or it is a node source provider
|
boolean |
checkPermission(String method)
Checks if the current user is allowed to execute the provided method
|
org.objectweb.proactive.core.util.wrapper.BooleanWrapper |
createNodeSource(String arg0,
String arg1,
Object[] arg2,
String arg3,
Object[] arg4,
boolean arg5) |
org.objectweb.proactive.core.util.wrapper.BooleanWrapper |
defineNodeSource(String arg0,
String arg1,
Object[] arg2,
String arg3,
Object[] arg4,
boolean arg5)
Defines a new node source in the resource manager.
|
org.objectweb.proactive.core.util.wrapper.BooleanWrapper |
deployNodeSource(String arg0)
Start acquiring the nodes of a node source that has been defined before.
|
org.objectweb.proactive.core.util.wrapper.BooleanWrapper |
editNodeSource(String arg0,
String arg1,
Object[] arg2,
String arg3,
Object[] arg4,
boolean arg5)
Edit an existing node source in the resource manager.
|
<T> List<ScriptResult<T>> |
executeScript(Script<T> script,
String targetType,
Set<String> targets)
Executes the script on the specified targets depending on the target type.
|
List<ScriptResult<Object>> |
executeScript(String script,
String scriptEngine,
String targetType,
Set<String> targets)
Executes the script on the specified targets depending on the target type.
|
Map<String,List<String>> |
getAllEligibleNodesTokens()
Get the list of tokens associated with all resource manager eligible nodes
|
Map<String,List<String>> |
getAllNodesTokens()
Get the list of tokens associated with all resource manager nodes
|
NodeSet |
getAtMostNodes(int arg0,
List<SelectionScript> arg1,
NodeSet arg2)
Finds "number" nodes for computations according to the selection scripts
(node must be complaint to all scripts).
|
NodeSet |
getAtMostNodes(int arg0,
SelectionScript arg1)
Finds "number" nodes for computations according to the selection script.
|
NodeSet |
getAtMostNodes(int arg0,
SelectionScript arg1,
NodeSet arg2)
Finds "number" nodes for computations according to the selection script.
|
NodeSet |
getAtMostNodes(int number,
TopologyDescriptor descriptor,
List<SelectionScript> selectionScriptsList,
NodeSet exclusion)
Finds "number" nodes for computations according to the selection scripts
(node must be complaint to all scripts).
|
org.objectweb.proactive.core.util.wrapper.StringWrapper |
getCurrentUser()
Returns the user currently connected
|
UserData |
getCurrentUserData()
Returns the groups associated with the current connected user.
|
List<RMNodeSourceEvent> |
getExistingNodeSourcesList()
Returns the list of existing node source infrastructures
|
Map<String,List<String>> |
getInfrasToPoliciesMapping()
Return the associations of infrastructures and policy
For each infrastructure name, the list of policies which can be associated
|
AttributeList |
getMBeanAttributes(ObjectName name,
String[] attributes)
returns a list of attributes whose names come from
attributes of the
MBean with the name name |
MBeanInfo |
getMBeanInfo(ObjectName name)
MBeanInfo object of the mbean represented by its objectname
name |
RMMonitoring |
getMonitoring()
Returns the monitoring interface to manager listeners of the resource manager.
|
NodeSet |
getNodes(Criteria criteria)
Finds and books nodes for computations.
|
NodeSet |
getNodes(int number,
TopologyDescriptor descriptor,
List<SelectionScript> selectionScriptsList,
NodeSet exclusion,
boolean bestEffort)
Deprecated.
|
Set<String> |
getNodesByTag(String tag)
Returns a list of nodes Urls which contain the specified tag
|
Set<String> |
getNodesByTags(Set<String> tags,
boolean all)
Returns a list of nodes Urls which contain all or any specified list of tags
|
List<RMNodeHistory> |
getNodesHistory(long windowStart,
long windowEnd)
Return all node state events for the given period
|
NodeSourceConfiguration |
getNodeSourceConfiguration(String nodeSourceName)
Returns the current configuration of a node source.
|
org.objectweb.proactive.core.util.wrapper.IntWrapper |
getNodeSourcePingFrequency(String arg0)
Returns the ping frequency of a node source.
|
Set<String> |
getNodeTags(String nodeUrl)
Return the set of tags associated with the given node
|
org.objectweb.proactive.core.util.wrapper.StringWrapper |
getNodeThreadDump(String nodeUrl)
Returns the string content of the thread dump asked to the
Node
identified by the given URL. |
List<String> |
getNodeTokens(String nodeUrl)
Get the list of tokens associated with the given node
|
org.objectweb.proactive.core.util.wrapper.StringWrapper |
getRMThreadDump()
Returns the string content of the thread dump asked to the
Node
of the Resource Manager. |
RMState |
getState()
Returns the resource manager summary state.
|
Collection<PluginDescriptor> |
getSupportedNodeSourceInfrastructures()
Returns the list of supported node source infrastructures descriptors.
|
Collection<PluginDescriptor> |
getSupportedNodeSourcePolicies()
Returns the list of supported node source policies descriptors.
|
Topology |
getTopology()
Returns the topology information of nodes.
|
org.objectweb.proactive.core.util.wrapper.BooleanWrapper |
isActive()
Returns true if the resource manager is operational and a client is connected.
|
org.objectweb.proactive.core.util.wrapper.BooleanWrapper |
isNodeAdmin(String nodeUrl)
Checks if the currently connected user is the node administrator
|
org.objectweb.proactive.core.util.wrapper.BooleanWrapper |
isNodeUser(String nodeUrl)
Checks if the currently connected user can use node for computations
|
Set<String> |
listAliveNodeUrls()
Returns a list of all alive Nodes Urls.
|
Set<String> |
listAliveNodeUrls(Set<String> nodeSourceNames)
Returns a list of all alive Nodes Urls associated with the given node sources.
|
Set<String> |
listNodeUrls()
Returns a list of all nodes Urls known by RMCore.
|
org.objectweb.proactive.core.util.wrapper.BooleanWrapper |
lockNodes(Set<String> urls)
Locks the set of nodes and makes them not available for others.
|
org.objectweb.proactive.core.util.wrapper.BooleanWrapper |
nodeIsAvailable(String arg0)
Returns true if the node nodeUrl is registered (i.e.
|
org.objectweb.proactive.core.util.wrapper.BooleanWrapper |
redeployNodeSource(String arg0)
Remove the nodes of a node source that has been deployed before, and
keep the node source defined in the resource manager, then deploy the node source
If the node source is undeployed, then this method does nothing.
|
void |
releaseBusyNodesNotInList(List<NodeSet> verifiedBusyNodes)
Release the nodes that are busy and that are not part of the given node set
|
org.objectweb.proactive.core.util.wrapper.BooleanWrapper |
releaseNode(org.objectweb.proactive.core.node.Node arg0)
Releases the node after computations.
|
org.objectweb.proactive.core.util.wrapper.BooleanWrapper |
releaseNodes(NodeSet arg0)
Releases nodes after computations.
|
org.objectweb.proactive.core.util.wrapper.BooleanWrapper |
removeNode(String arg0,
boolean arg1)
Removes a node from the resource manager.
|
org.objectweb.proactive.core.util.wrapper.BooleanWrapper |
removeNodeSource(String arg0,
boolean arg1)
Remove a node source from the RM.
|
void |
removeNodeToken(String nodeUrl,
String token)
Remove a token from the given node
|
void |
setMBeanAttribute(ObjectName objectName,
String type,
String name,
String value)
Set a single JMX attribute of the MBean
objectName . |
void |
setNeededNodes(int neededNodes)
Set the amount of nodes currently needed by the resource manager
|
Set<String> |
setNodesAvailable(Set<String> nodeUrls)
This method is called periodically by ProActive Nodes to inform the
Resource Manager of a possible reconnection.
|
org.objectweb.proactive.core.util.wrapper.BooleanWrapper |
setNodeSourcePingFrequency(int arg0,
String arg1)
Each node source scan its nodes periodically to check their states.
|
void |
setNodeTokens(String nodeUrl,
List<String> tokens)
Overwrite the tokens list associated with the given node
|
org.objectweb.proactive.core.util.wrapper.BooleanWrapper |
shutdown(boolean arg0)
Initiate the shutdowns the resource manager.
|
org.objectweb.proactive.core.util.wrapper.BooleanWrapper |
undeployNodeSource(String arg0,
boolean arg1)
Remove the nodes of a node source that has been deployed before, and
keep the node source defined in the resource manager.
|
org.objectweb.proactive.core.util.wrapper.BooleanWrapper |
unlockNodes(Set<String> urls)
Unlock nodes.
|
org.objectweb.proactive.core.util.wrapper.BooleanWrapper |
updateDynamicParameters(String arg0,
String arg1,
Object[] arg2,
String arg3,
Object[] arg4)
Update the infrastructure or policy parameters of a node source that
marked with 'dynamic'.
|
disconnect, getNodeMBeanHistory, getNodeMBeanInfo, getNodeMBeansHistory, getNodeMBeansInfo, getRMStateDelta, getRMStateFull, init, init, nodeEvent, nodeSourceEvent, rmEvent
notify
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
disconnect
public org.objectweb.proactive.core.util.wrapper.BooleanWrapper addNode(String arg0)
ResourceManager
addNode
in interface ResourceManager
arg0
- URL of the node to add.ResourceManager.addNode(java.lang.String)
public org.objectweb.proactive.core.util.wrapper.BooleanWrapper addNode(String arg0, String arg1)
ResourceManager
addNode
in interface ResourceManager
arg0
- URL of the node to add.arg1
- name of the static node source that will handle the nodeResourceManager.addNode(java.lang.String, java.lang.String)
public org.objectweb.proactive.core.util.wrapper.BooleanWrapper acquireNodes(String sourceName, int numberNodes, long timeout, Map<String,?> nodeConfiguration)
ResourceManager
acquireNodes
in interface ResourceManager
sourceName
- name of the node source that will acquire the new nodesnumberNodes
- the number of nodes to acquiretimeout
- the maxime waiting time (in milliseconds) before starting to acquire nodesnodeConfiguration
- configuration of acquiring nodespublic List<RMNodeSourceEvent> getExistingNodeSourcesList()
ResourceManager
getExistingNodeSourcesList
in interface ResourceManager
public org.objectweb.proactive.core.util.wrapper.BooleanWrapper defineNodeSource(String arg0, String arg1, Object[] arg2, String arg3, Object[] arg4, boolean arg5)
ResourceManager
defineNodeSource
in interface ResourceManager
arg0
- the name of the node sourcearg1
- type of the underlying infrastructurearg2
- parameters for infrastructure creationarg3
- name of the policy type. It passed as a string due to plug-able approacharg4
- parameters for policy creationarg5
- whether the nodes can be recovered in case of a scheduler crashResourceManager.defineNodeSource(String, String, Object[], String, Object[], boolean)
public org.objectweb.proactive.core.util.wrapper.BooleanWrapper editNodeSource(String arg0, String arg1, Object[] arg2, String arg3, Object[] arg4, boolean arg5)
ResourceManager
editNodeSource
in interface ResourceManager
arg0
- the name of the node source to editarg1
- type of the underlying infrastructurearg2
- parameters for infrastructure creationarg3
- name of the policy type. It passed as a string due to plug-able approacharg4
- parameters for policy creationarg5
- whether the nodes can be recovered in case of a scheduler crashResourceManager.editNodeSource(String, String, Object[], String, Object[], boolean)
public org.objectweb.proactive.core.util.wrapper.BooleanWrapper updateDynamicParameters(String arg0, String arg1, Object[] arg2, String arg3, Object[] arg4)
ResourceManager
updateDynamicParameters
in interface ResourceManager
arg0
- the name of the node sourcearg1
- type of the underlying infrastructurearg2
- parameters of the infrastructure, including the dynamic parameters values to updatearg3
- name of the policy typearg4
- parameters of the policy, including the dynamic parameters values to updateResourceManager.updateDynamicParameters(String, String, Object[], String, Object[])
public org.objectweb.proactive.core.util.wrapper.BooleanWrapper createNodeSource(String arg0, String arg1, Object[] arg2, String arg3, Object[] arg4, boolean arg5)
createNodeSource
in interface ResourceManager
arg0
- the name of the node sourcearg1
- type of the underlying infrastructurearg2
- parameters for infrastructure creationarg3
- name of the policy type. It passed as a string due to plug-able approacharg4
- parameters for policy creationarg5
- whether the nodes can be recovered in case of a scheduler crashResourceManager.createNodeSource(String, String, Object[], String, Object[], boolean)
public org.objectweb.proactive.core.util.wrapper.BooleanWrapper deployNodeSource(String arg0)
ResourceManager
deployNodeSource
in interface ResourceManager
arg0
- the name of the node source to deployResourceManager.deployNodeSource(String)
public org.objectweb.proactive.core.util.wrapper.BooleanWrapper undeployNodeSource(String arg0, boolean arg1)
ResourceManager
undeployNodeSource
in interface ResourceManager
arg0
- the name of the node source to undeployarg1
- if true remove the nodes immediately without waiting them to be freed.ResourceManager.undeployNodeSource(String, boolean)
public org.objectweb.proactive.core.util.wrapper.BooleanWrapper redeployNodeSource(String arg0)
ResourceManager
redeployNodeSource
in interface ResourceManager
arg0
- the name of the node source to redeployResourceManager.redeployNodeSource(String)
public NodeSet getAtMostNodes(int arg0, SelectionScript arg1)
ResourceManager
If the resource manager does not have enough nodes it returns as much as it has, but only those which correspond to the selection criteria.
getAtMostNodes
in interface ResourceManager
arg0
- the number of nodesarg1
- criterion to be verified by the returned nodesResourceManager.getAtMostNodes(int, org.ow2.proactive.scripting.SelectionScript)
public NodeSet getAtMostNodes(int arg0, SelectionScript arg1, NodeSet arg2)
ResourceManager
If the resource manager does not have enough nodes it returns as much as it has, but only those which correspond the to selection criteria.
getAtMostNodes
in interface ResourceManager
arg0
- the number of nodesarg1
- criterion to be verified by the returned nodesarg2
- a list of node which should not be in the result setResourceManager.getAtMostNodes(int, org.ow2.proactive.scripting.SelectionScript, org.ow2.proactive.utils.NodeSet)
public NodeSet getAtMostNodes(int arg0, List<SelectionScript> arg1, NodeSet arg2)
ResourceManager
If the resource manager does not have enough nodes it returns as much as it has, but only those which correspond the to selection criteria.
getAtMostNodes
in interface ResourceManager
arg0
- the number of nodesarg1
- criteria to be verified by the returned nodesarg2
- a list of node which should not be in the result setResourceManager.getAtMostNodes(int, java.util.List, org.ow2.proactive.utils.NodeSet)
public RMMonitoring getMonitoring()
ResourceManager
getMonitoring
in interface ResourceManager
ResourceManager.getMonitoring()
public Set<String> listAliveNodeUrls()
ResourceManager
listAliveNodeUrls
in interface ResourceManager
public Set<String> listAliveNodeUrls(Set<String> nodeSourceNames)
ResourceManager
listAliveNodeUrls
in interface ResourceManager
nodeSourceNames
- set of node sources containing the nodes.public Set<String> listNodeUrls()
ResourceManager
listNodeUrls
in interface ResourceManager
public org.objectweb.proactive.core.util.wrapper.IntWrapper getNodeSourcePingFrequency(String arg0)
ResourceManager
getNodeSourcePingFrequency
in interface ResourceManager
arg0
- name of the node sourceResourceManager.getNodeSourcePingFrequency(java.lang.String)
public RMState getState()
ResourceManager
RMMonitoring
.getState() method.getState
in interface ResourceManager
ResourceManager.getState()
public Collection<PluginDescriptor> getSupportedNodeSourceInfrastructures()
ResourceManager
getSupportedNodeSourceInfrastructures
in interface ResourceManager
ResourceManager.getSupportedNodeSourceInfrastructures()
public Collection<PluginDescriptor> getSupportedNodeSourcePolicies()
ResourceManager
getSupportedNodeSourcePolicies
in interface ResourceManager
ResourceManager.getSupportedNodeSourcePolicies()
public NodeSourceConfiguration getNodeSourceConfiguration(String nodeSourceName)
ResourceManager
getNodeSourceConfiguration
in interface ResourceManager
ResourceManager.getNodeSourceConfiguration(String)
public org.objectweb.proactive.core.util.wrapper.BooleanWrapper isActive()
ResourceManager
isActive
in interface ResourceManager
ResourceManager.isActive()
public org.objectweb.proactive.core.util.wrapper.BooleanWrapper nodeIsAvailable(String arg0)
ResourceManager
nodeIsAvailable
in interface ResourceManager
arg0
- of node to ping.ResourceManager.nodeIsAvailable(java.lang.String)
public Set<String> setNodesAvailable(Set<String> nodeUrls)
setNodesAvailable
in interface ResourceManager
nodeUrls
- the URLs of the workers associated to the node that publishes the update.public org.objectweb.proactive.core.util.wrapper.BooleanWrapper releaseNode(org.objectweb.proactive.core.node.Node arg0)
ResourceManager
releaseNode
in interface ResourceManager
arg0
- the node to be releasedSecurityException
may be thrown if the user does not have right to release the node or it tries to release
a foreign node.ResourceManager.releaseNode(org.objectweb.proactive.core.node.Node)
public org.objectweb.proactive.core.util.wrapper.BooleanWrapper releaseNodes(NodeSet arg0)
ResourceManager
releaseNodes
in interface ResourceManager
arg0
- the set of nodes to be releasedSecurityException
may be thrown if the user does not have right to release one of nodes or it tries to release
a foreign node.ResourceManager.releaseNodes(org.ow2.proactive.utils.NodeSet)
public org.objectweb.proactive.core.util.wrapper.BooleanWrapper removeNode(String arg0, boolean arg1)
ResourceManager
removeNode
in interface ResourceManager
arg0
- URL of the node to remove.arg1
- if true remove the node immediately without waiting while it will be freed.ResourceManager.removeNode(java.lang.String, boolean)
public org.objectweb.proactive.core.util.wrapper.BooleanWrapper removeNodeSource(String arg0, boolean arg1)
ResourceManager
removeNodeSource
in interface ResourceManager
arg0
- name of the source to remove.arg1
- if true remove the node immediately without waiting while it will be freed.ResourceManager.removeNodeSource(java.lang.String, boolean)
public org.objectweb.proactive.core.util.wrapper.BooleanWrapper setNodeSourcePingFrequency(int arg0, String arg1)
ResourceManager
setNodeSourcePingFrequency
in interface ResourceManager
arg0
- the frequency to set to the node source in ms.arg1
- name of the node source to set the frequencyResourceManager.setNodeSourcePingFrequency(int, java.lang.String)
public org.objectweb.proactive.core.util.wrapper.BooleanWrapper shutdown(boolean arg0)
ResourceManager
RMEvent
(SHUTDOWN) will be send when the shutdown is finished.
shutdown
in interface ResourceManager
ResourceManager.shutdown(boolean)
public NodeSet getAtMostNodes(int number, TopologyDescriptor descriptor, List<SelectionScript> selectionScriptsList, NodeSet exclusion)
ResourceManager
If the resource manager does not have enough nodes it returns as much as it has, but only those which correspond the to selection criteria.
getAtMostNodes
in interface ResourceManager
number
- the number of nodesdescriptor
- the topology descriptor of nodesselectionScriptsList
- criteria to be verified by the returned nodesexclusion
- a list of node which should not be in the result setResourceManager.getAtMostNodes(int, org.ow2.proactive.topology.descriptor.TopologyDescriptor, java.util.List, org.ow2.proactive.utils.NodeSet)
public Topology getTopology()
ResourceManager
getTopology
in interface ResourceManager
ResourceManager.getTopology()
public org.objectweb.proactive.core.util.wrapper.BooleanWrapper lockNodes(Set<String> urls)
ResourceManager
lockNodes
in interface ResourceManager
urls
- is a set of nodestrue
if all the nodes become locked, false
otherwise.ResourceManager.lockNodes(java.util.Set)
public org.objectweb.proactive.core.util.wrapper.BooleanWrapper unlockNodes(Set<String> urls)
ResourceManager
unlockNodes
in interface ResourceManager
urls
- is a set of nodes to be unlocked.true
if all the nodes are unlocked with success, false
otherwise.ResourceManager.unlockNodes(java.util.Set)
public MBeanInfo getMBeanInfo(ObjectName name) throws InstanceNotFoundException, IntrospectionException, ReflectionException, IOException
name
name
- the objectname of the mbeanInstanceNotFoundException
IntrospectionException
ReflectionException
IOException
public AttributeList getMBeanAttributes(ObjectName name, String[] attributes) throws InstanceNotFoundException, IntrospectionException, ReflectionException, IOException
attributes
of the
MBean with the name name
name
- the object name of the mbeanattributes
- the names of the request attributesInstanceNotFoundException
IntrospectionException
ReflectionException
IOException
public void setMBeanAttribute(ObjectName objectName, String type, String name, String value) throws InstanceNotFoundException, IntrospectionException, ReflectionException, IOException, MBeanException, InvalidAttributeValueException, AttributeNotFoundException, IllegalArgumentException
objectName
.
Only integer and string attributes are currently supported, see type
.objectName
- the object name of the MBeantype
- the type of the attribute to set ('integer' and 'string' are currently supported, see RMProxyUserInterface
)name
- the name of the attribute to setvalue
- the new value of the attribute (defined as a String, it is automatically converted according to type
)InstanceNotFoundException
IntrospectionException
ReflectionException
IOException
MBeanException
InvalidAttributeValueException
AttributeNotFoundException
IllegalArgumentException
public org.objectweb.proactive.core.util.wrapper.BooleanWrapper isNodeAdmin(String nodeUrl)
ResourceManager
isNodeAdmin
in interface ResourceManager
public org.objectweb.proactive.core.util.wrapper.BooleanWrapper isNodeUser(String nodeUrl)
ResourceManager
isNodeUser
in interface ResourceManager
public <T> List<ScriptResult<T>> executeScript(Script<T> script, String targetType, Set<String> targets)
ResourceManager
executeScript
in interface ResourceManager
script
- a selection script to execute.targetType
- must be either NODE_URL, NODESOURCE_NAME or HOSTNAMEtargets
- are names of particular resourcesScriptResult
corresponding to the script execution.@Deprecated public NodeSet getNodes(int number, TopologyDescriptor descriptor, List<SelectionScript> selectionScriptsList, NodeSet exclusion, boolean bestEffort)
ResourceManager
If the resource manager does not have enough nodes the result depends on the bestEffort mode. If set to true, the method returns as many node as it has, but only those which correspond the to selection criteria. If bestEffort set to false the method returns either 0 or all required nodes.
getNodes
in interface ResourceManager
number
- the number of nodesdescriptor
- the topology descriptor of nodesselectionScriptsList
- criteria to be verified by the returned nodesexclusion
- a list of node which should not be in the result setbestEffort
- the mode of node aggregationTopologyDescriptor
public NodeSet getNodes(Criteria criteria)
ResourceManager
getNodes
in interface ResourceManager
criteria
- criteria to select nodesCriteria
public List<ScriptResult<Object>> executeScript(String script, String scriptEngine, String targetType, Set<String> targets)
ResourceManager
executeScript
in interface ResourceManager
script
- a selection script to execute.scriptEngine
- script engine nametargetType
- must be either NODE_URL, NODESOURCE_NAME or HOSTNAMEtargets
- are names of particular resourcesScriptResult
corresponding to the script execution.public org.objectweb.proactive.core.util.wrapper.StringWrapper getCurrentUser()
ResourceManager
getCurrentUser
in interface ResourceManager
public UserData getCurrentUserData()
ResourceManager
getCurrentUserData
in interface ResourceManager
public void releaseBusyNodesNotInList(List<NodeSet> verifiedBusyNodes)
ResourceManager
releaseBusyNodesNotInList
in interface ResourceManager
verifiedBusyNodes
- nodes that should not be releasedpublic boolean areNodesKnown(NodeSet nodes)
ResourceManager
areNodesKnown
in interface ResourceManager
nodes
- the node set to verifypublic Map<String,Boolean> areNodesRecoverable(NodeSet nodes)
ResourceManager
areNodesRecoverable
in interface ResourceManager
nodes
- the node set to verifypublic void setNeededNodes(int neededNodes)
ResourceManager
setNeededNodes
in interface ResourceManager
neededNodes
- number of nodes neededpublic Map<String,List<String>> getInfrasToPoliciesMapping()
ResourceManager
getInfrasToPoliciesMapping
in interface ResourceManager
public List<RMNodeHistory> getNodesHistory(long windowStart, long windowEnd)
ResourceManager
getNodesHistory
in interface ResourceManager
windowStart
- period start timewindowEnd
- period end timepublic org.objectweb.proactive.core.util.wrapper.StringWrapper getRMThreadDump()
ResourceManager
Node
of the Resource Manager.getRMThreadDump
in interface ResourceManager
public org.objectweb.proactive.core.util.wrapper.StringWrapper getNodeThreadDump(String nodeUrl)
ResourceManager
Node
identified by the given URL.getNodeThreadDump
in interface ResourceManager
nodeUrl
- node to ask the thread dump topublic void addNodeToken(String nodeUrl, String token) throws RMException
ResourceManager
addNodeToken
in interface ResourceManager
nodeUrl
- url of the nodetoken
- token to addRMException
public void removeNodeToken(String nodeUrl, String token) throws RMException
ResourceManager
removeNodeToken
in interface ResourceManager
nodeUrl
- url of the nodetoken
- token to removeRMException
public void setNodeTokens(String nodeUrl, List<String> tokens) throws RMException
ResourceManager
setNodeTokens
in interface ResourceManager
nodeUrl
- url of the nodetokens
- list of tokensRMException
public List<String> getNodeTokens(String nodeUrl) throws RMException
ResourceManager
getNodeTokens
in interface ResourceManager
nodeUrl
- url of the nodeRMException
public Map<String,List<String>> getAllNodesTokens() throws RMException
ResourceManager
getAllNodesTokens
in interface ResourceManager
RMException
public Map<String,List<String>> getAllEligibleNodesTokens() throws RMException
ResourceManager
getAllEligibleNodesTokens
in interface ResourceManager
RMException
public Set<String> getNodeTags(String nodeUrl) throws RMException
ResourceManager
getNodeTags
in interface ResourceManager
nodeUrl
- url of the nodeRMException
public Set<String> getNodesByTag(String tag)
ResourceManager
getNodesByTag
in interface ResourceManager
tag
- the expected tag which should be contained in the returned nodepublic Set<String> getNodesByTags(Set<String> tags, boolean all)
ResourceManager
getNodesByTags
in interface ResourceManager
tags
- list of tagsall
- When true, the search return nodes which contain all tags;
when false, the search return nodes which contain any tag among the list tags.public org.objectweb.proactive.core.util.wrapper.BooleanWrapper checkNodePermission(String nodeUrl, boolean provider)
ResourceManager
checkNodePermission
in interface ResourceManager
nodeUrl
- the node urlprovider
- if false, the method will check if the user is admin, if true, the method will also check if the node is a providerResourceManager.checkNodePermission(String, boolean)
public org.objectweb.proactive.core.util.wrapper.BooleanWrapper checkNodeSourcePermission(String nodeSourceName, boolean provider)
ResourceManager
checkNodeSourcePermission
in interface ResourceManager
nodeSourceName
- the node source nameprovider
- if false, the method will check if the user is admin, if true, the method will also check if the node is a providerResourceManager.checkNodeSourcePermission(String, boolean)
public boolean checkPermission(String method) throws SecurityException
ServiceUsingPermission
checkPermission
in interface ServiceUsingPermission
method
- method nameSecurityException
- if the user is not allowed to execute this method