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, nodeConnector, nodeConnectorUrl, rmAuth, rmInitialState, RMstate, target
Constructor and Description |
---|
RMProxyUserInterface() |
Modifier and Type | Method and Description |
---|---|
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.
|
boolean |
areNodesKnown(NodeSet nodes)
Check whether the nodes in the given node set are known by the resource
manager
|
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 |
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.
|
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
|
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.
|
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.
|
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. |
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.
|
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.
|
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 |
setMBeanAttribute(ObjectName objectName,
String type,
String name,
String value)
Set a single JMX attribute of the MBean
objectName . |
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.
|
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 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 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 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 boolean areNodesRecoverable(NodeSet nodes)
ResourceManager
areNodesRecoverable
in interface ResourceManager
nodes
- the node set to verifypublic 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 to