Package org.jppf.management.forwarding
Interface NodeForwardingMBean
- All Superinterfaces:
ForwardingNotficationEmitter,NotificationBroadcaster,NotificationEmitter,Serializable
@MBeanNotif(description="notifications emitted by this MBean wrap actual notifications received from the nodes, then are forwarded to the JMX notification listeners whose node selector matches the emitting nodes",
notifClass=JPPFNodeForwardingNotification.class)
public interface NodeForwardingMBean
extends Serializable, NotificationEmitter, ForwardingNotficationEmitter
MBean interface for forwarding node management requests and monitoring notfications via the driver.
- Since:
- 6.2
- Author:
- Laurent Cohen
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptioncancelJob(NodeSelector selector, String jobId, Boolean requeue) Cancel the job with the specified id in the specified nodes.<E> ResultsMap<String,E> forwardGetAttribute(NodeSelector selector, String mbeanName, String attribute) Get the value of an attribute of the specified MBean for each specified node.<E> ResultsMap<String,E> forwardInvoke(NodeSelector selector, String mbeanName, String methodName) Convenience method to invoke an MBean method that has no parameter.<E> ResultsMap<String,E> forwardInvoke(NodeSelector selector, String mbeanName, String methodName, Object[] params, String[] signature) Invoke a method on the specified MBean of the selected nodes attached to the driver.forwardSetAttribute(NodeSelector selector, String mbeanName, String attribute, Object value) Set the value of an attribute of the specified MBean on the specified nodes attached to the driver.gc(NodeSelector selector) InvokeSystem.gc()on the specified nodes.getDelegationModel(NodeSelector selector) Get the current class loader delegation model for the specified nodes.getNbSlaves(NodeSelector selector) Get the number of provisioned slave nodes for the selected nodes.healthSnapshot(NodeSelector selector) Get the JVM health snapshot for the specified nodes.heapDump(NodeSelector selector) Trigger a heap dump on the specified nodes.provisionSlaveNodes(NodeSelector selector, int nbNodes) Start or stop the required number of slaves to reach the specified number on the selected nodes.provisionSlaveNodes(NodeSelector selector, int nbNodes, boolean interruptIfRunning) Start or stop the required number of slaves to reach the specified number on the selected nodes.provisionSlaveNodes(NodeSelector selector, int nbNodes, boolean interruptIfRunning, TypedProperties configOverrides) Start or stop the required number of slaves to reach the specified number, using the specified config overrides, on the selected nodes.provisionSlaveNodes(NodeSelector selector, int nbNodes, TypedProperties configOverrides) Start or stop the required number of slaves to reach the specified number, using the specified config overrides, on the selected nodes.reconnect(NodeSelector selector, Boolean interruptIfRunning) Force the specified nodes to reconnect.resetTaskCounter(NodeSelector selector) Reset the specified nodes' executed tasks counter to zero.restart(NodeSelector selector) Restart the specified nodes.restart(NodeSelector selector, Boolean interruptIfRunning) Restart the specified nodes.setDelegationModel(NodeSelector selector, DelegationModel model) Set the current class loader delegation model for the specified nodes.setTaskCounter(NodeSelector selector, Integer n) Reset the specified nodes' executed tasks counter to the specified value.shutdown(NodeSelector selector) Shutdown the specified nodes.shutdown(NodeSelector selector, Boolean interruptIfRunning) Shutdown the specified nodes.state(NodeSelector selector) Get the latest state information from the node.systemInformation(NodeSelector selector) Get the system information for the specified nodes.threadDump(NodeSelector selector) Get a JVM thread dump for the specified nodes.updateConfiguration(NodeSelector selector, Map<Object, Object> configOverrides, Boolean restart) Update the configuration properties of the specified nodes.updateConfiguration(NodeSelector selector, Map<Object, Object> configOverrides, Boolean restart, Boolean interruptIfRunning) Update the configuration properties of the specified nodes.updateThreadPoolSize(NodeSelector selector, Integer size) Set the size of the specified nodes' thread pool.updateThreadsPriority(NodeSelector selector, Integer newPriority) Update the priority of all execution threads for the specified nodes.Methods inherited from interface org.jppf.management.forwarding.ForwardingNotficationEmitter
registerForwardingNotificationListener, unregisterForwardingNotificationListenerMethods inherited from interface javax.management.NotificationBroadcaster
addNotificationListener, getNotificationInfo, removeNotificationListenerMethods inherited from interface javax.management.NotificationEmitter
removeNotificationListener
-
Field Details
-
MBEAN_NAME
Name of the driver's admin MBean.- See Also:
-
-
Method Details
-
forwardInvoke
<E> ResultsMap<String,E> forwardInvoke(NodeSelector selector, String mbeanName, String methodName, Object[] params, String[] signature) throws Exception Invoke a method on the specified MBean of the selected nodes attached to the driver.- Type Parameters:
E- the type of results.- Parameters:
selector- a filter on the nodes attached tot he driver, determines the nodes to which this method applies.mbeanName- the name of the MBean.methodName- the name of the method to invoke.params- the method parameter values.signature- the types of the method parameters.- Returns:
- a mapping of node uuids to the result of invoking the MBean method on the corresponding node. Each result may be an exception.
Additionally, each result may benull, in particular if the invoked method has avoidreturn type. - Throws:
Exception- if the invocation failed.
-
forwardInvoke
<E> ResultsMap<String,E> forwardInvoke(NodeSelector selector, String mbeanName, String methodName) throws Exception Convenience method to invoke an MBean method that has no parameter.
This is equivalent to callingforwardInvoke(selector, name, methodName, (Object[]) null, (String[]) null).- Type Parameters:
E- the type of results.- Parameters:
selector- a filter on the nodes attached to the driver, determines the nodes to which this method applies.mbeanName- the name of the node MBean to invoke.methodName- the name of the method to invoke.- Returns:
- a mapping of node uuids to the result of invoking the MBean method on the corresponding node. Each result may be an exception.
Additionally, each result may benull, in particular if the invoked method has avoidreturn type. - Throws:
Exception- if the invocation failed.
-
forwardGetAttribute
<E> ResultsMap<String,E> forwardGetAttribute(NodeSelector selector, String mbeanName, String attribute) throws Exception Get the value of an attribute of the specified MBean for each specified node.- Type Parameters:
E- the type of results.- Parameters:
selector- a filter on the nodes attached tot he driver, determines the nodes to which this method applies.mbeanName- the name of the MBean to invoke for each node.attribute- the name of the MBean attribute to read.- Returns:
- a mapping of node uuids to the result of getting the MBean attribute on the corresponding node. Each result may be an exception.
- Throws:
Exception- if the invocation failed.
-
forwardSetAttribute
ResultsMap<String,Void> forwardSetAttribute(NodeSelector selector, String mbeanName, String attribute, Object value) throws Exception Set the value of an attribute of the specified MBean on the specified nodes attached to the driver.- Parameters:
selector- a filter on the nodes attached to the driver, determines the nodes to which this method applies.mbeanName- the name of the MBean to invoke for each node.attribute- the name of the MBean attribute to set.value- the value to set on the attribute.- Returns:
- a mapping of node uuids to an eventual exception resulting from setting the MBean attribute on the corresponding node.
- Throws:
Exception- if the invocation failed.
-
state
Get the latest state information from the node.- Parameters:
selector- a filter on the nodes attached to the driver, determines the nodes to which this method applies.- Returns:
- a mapping of node uuids to the result of invoking the MBean method on the corresponding node.
Each result may be either a
JPPFNodeStateobject, or an exception if the invocation failed for the corresponding node. - Throws:
Exception- if any error occurs.- See Also:
-
updateThreadPoolSize
Set the size of the specified nodes' thread pool.- Parameters:
selector- a filter on the nodes attached to the driver, determines the nodes to which this method applies.size- the size as an int.- Returns:
- a mapping of node uuids to an eventual exception resulting from invoking this method on the corresponding node.
- Throws:
Exception- if any error occurs.- See Also:
-
updateThreadsPriority
ResultsMap<String,Void> updateThreadsPriority(NodeSelector selector, Integer newPriority) throws Exception Update the priority of all execution threads for the specified nodes.- Parameters:
selector- a filter on the nodes attached to the driver, determines the nodes to which this method applies.newPriority- the new priority to set.- Returns:
- a mapping of node uuids to an eventual exception resulting from invoking this method on the corresponding node.
- Throws:
Exception- if an error is raised when invoking the node mbean.- See Also:
-
restart
Restart the specified nodes.- Parameters:
selector- a filter on the nodes attached to the driver, determines the nodes to which this method applies.- Returns:
- a mapping of node uuids to an eventual exception resulting from invoking this method on the corresponding node.
- Throws:
Exception- if any error occurs.- See Also:
-
restart
Restart the specified nodes.- Parameters:
selector- a filter on the nodes attached to the driver, determines the nodes to which this method applies.interruptIfRunning- whether to restart immediately or wait until each node is idle.- Returns:
- a mapping of node uuids to an eventual exception resulting from invoking this method on the corresponding node.
- Throws:
Exception- if any error occurs.- See Also:
-
shutdown
Shutdown the specified nodes.- Parameters:
selector- a filter on the nodes attached to the driver, determines the nodes to which this method applies.- Returns:
- a mapping of node uuids to an eventual exception resulting from invoking this method on the corresponding node.
- Throws:
Exception- if any error occurs.- See Also:
-
shutdown
ResultsMap<String,Void> shutdown(NodeSelector selector, Boolean interruptIfRunning) throws Exception Shutdown the specified nodes.- Parameters:
selector- a filter on the nodes attached to the driver, determines the nodes to which this method applies.interruptIfRunning- whether to shutdown immediately or wait until each node is idle.- Returns:
- a mapping of node uuids to an eventual exception resulting from invoking this method on the corresponding node.
- Throws:
Exception- if any error occurs.- See Also:
-
reconnect
ResultsMap<String,Void> reconnect(NodeSelector selector, Boolean interruptIfRunning) throws Exception Force the specified nodes to reconnect.- Parameters:
selector- a filter on the nodes attached to the driver, determines the nodes to which this method applies.interruptIfRunning- whether to reconnect immediately or wait until each node is idle.- Returns:
- a mapping of node uuids to an eventual exception resulting from invoking this method on the corresponding node.
- Throws:
Exception- if any error occurs.- See Also:
-
resetTaskCounter
Reset the specified nodes' executed tasks counter to zero.- Parameters:
selector- a filter on the nodes attached to the driver, determines the nodes to which this method applies.- Returns:
- a mapping of node uuids to an eventual exception resulting from invoking this method on the corresponding node.
- Throws:
Exception- if any error occurs.- See Also:
-
setTaskCounter
Reset the specified nodes' executed tasks counter to the specified value.- Parameters:
selector- a filter on the nodes attached to the driver, determines the nodes to which this method applies.n- the number to set the task counter to.- Returns:
- a mapping of node uuids to an eventual exception resulting from invoking this method on the corresponding node.
- Throws:
Exception- if any error occurs.- See Also:
-
updateConfiguration
ResultsMap<String,Void> updateConfiguration(NodeSelector selector, Map<Object, Object> configOverrides, Boolean restart, Boolean interruptIfRunning) throws ExceptionUpdate the configuration properties of the specified nodes.- Parameters:
selector- a filter on the nodes attached to the driver, determines the nodes to which this method applies.configOverrides- the set of properties to update.restart- specifies whether the node should be restarted after updating the properties.interruptIfRunning- whentrue, then restart the node even if it is executing tasks, whenfalse, then only shutdown the node when it is no longer executing. This parameter only applies when therestartparameter istrue.- Returns:
- a mapping of node uuids to an eventual exception resulting from invoking this method on the corresponding node.
- Throws:
Exception- if any error occurs.- See Also:
-
updateConfiguration
ResultsMap<String,Void> updateConfiguration(NodeSelector selector, Map<Object, Object> configOverrides, Boolean restart) throws ExceptionUpdate the configuration properties of the specified nodes.- Parameters:
selector- a filter on the nodes attached to the driver, determines the nodes to which this method applies.configOverrides- the set of properties to update.restart- specifies whether the node should be restarted after updating the properties.- Returns:
- a mapping of node uuids to an eventual exception resulting from invoking this method on the corresponding node.
- Throws:
Exception- if any error occurs.- See Also:
-
cancelJob
ResultsMap<String,Void> cancelJob(NodeSelector selector, String jobId, Boolean requeue) throws Exception Cancel the job with the specified id in the specified nodes.- Parameters:
selector- a filter on the nodes attached to the driver, determines the nodes to which this method applies.jobId- the id of the job to cancel.requeue- true if the job should be requeued on the server side, false otherwise.- Returns:
- a mapping of node uuids to an eventual exception resulting invoking this method on the corresponding node.
- Throws:
Exception- if any error occurs.- See Also:
-
getDelegationModel
Get the current class loader delegation model for the specified nodes.- Parameters:
selector- a filter on the nodes attached to the driver, determines the nodes to which this method applies.- Returns:
- a mapping of node uuids to the result of invoking the MBean method on the corresponding node.
Each result may be either a
DelegationModelenum value, or an exception if the invocation failed for the corresponding node. - Throws:
Exception- if any error occurs.- See Also:
-
AbstractJPPFClassLoader.getDelegationModel()JPPFNodeAdminMBean.getDelegationModel()
-
setDelegationModel
ResultsMap<String,Void> setDelegationModel(NodeSelector selector, DelegationModel model) throws Exception Set the current class loader delegation model for the specified nodes.- Parameters:
selector- a filter on the nodes attached to the driver, determines the nodes to which this method applies.model- either eitherPARENT_FIRSTorURL_FIRST. If any other value is specified then this method has no effect.- Returns:
- a mapping of node uuids to an eventual exception resulting from invoking this method on the corresponding node.
- Throws:
Exception- if any error occurs.- See Also:
-
AbstractJPPFClassLoader.setDelegationModel(org.jppf.classloader.DelegationModel)JPPFNodeAdminMBean.setDelegationModel(DelegationModel)
-
systemInformation
Get the system information for the specified nodes.- Parameters:
selector- a filter on the nodes attached to the driver, determines the nodes to which this method applies.- Returns:
- a mapping of node uuids to an eventual exception resulting from invoking this method on the corresponding node.
- Throws:
Exception- if any error occurs.- See Also:
-
healthSnapshot
Get the JVM health snapshot for the specified nodes.- Parameters:
selector- a filter on the nodes attached to the driver, determines the nodes to which this method applies.- Returns:
- a mapping of node uuids to an eventual exception resulting from invoking this method on the corresponding node.
- Throws:
Exception- if any error occurs.- See Also:
-
gc
InvokeSystem.gc()on the specified nodes.- Parameters:
selector- a filter on the nodes attached to the driver, determines the nodes to which this method applies.- Returns:
- a mapping of node uuids to an eventual exception resulting from invoking this method on the corresponding node.
- Throws:
Exception- if any error occurs.- See Also:
-
heapDump
Trigger a heap dump on the specified nodes.- Parameters:
selector- a filter on the nodes attached to the driver, determines the nodes to which this method applies.- Returns:
- a mapping of node uuids to a string holding the path to the heap dump in each node's file system.
- Throws:
Exception- if any error occurs.- See Also:
-
threadDump
Get a JVM thread dump for the specified nodes.- Parameters:
selector- a filter on the nodes attached to the driver, determines the nodes to which this method applies.- Returns:
- a mapping of node uuids to an eventual exception resulting from invoking this method on the corresponding node.
- Throws:
Exception- if any error occurs.- See Also:
-
getNbSlaves
Get the number of provisioned slave nodes for the selected nodes.- Parameters:
selector- a filter on the nodes attached to the driver, determines the nodes to which this method applies.- Returns:
- a mapping of node uuids to either an
intcorresponding to the number of slaves provisioned by the node, or an eventual exception resulting from invoking this method on the corresponding node. - Throws:
Exception- if any error occurs.- See Also:
-
provisionSlaveNodes
Start or stop the required number of slaves to reach the specified number on the selected nodes. This is equivalent to callingprovisionSlaveNodes(nbNodes, null).- Parameters:
selector- a filter on the nodes attached to the driver, determines the nodes to which this method applies.nbNodes- the number of slave nodes to reach.- Returns:
- a mapping of node uuids to an eventual exception resulting from invoking this method on the corresponding node.
- Throws:
Exception- if any error occurs.- See Also:
-
provisionSlaveNodes
ResultsMap<String,Void> provisionSlaveNodes(NodeSelector selector, int nbNodes, boolean interruptIfRunning) throws Exception Start or stop the required number of slaves to reach the specified number on the selected nodes.- Parameters:
selector- a filter on the nodes attached to the driver, determines the nodes to which this method applies.nbNodes- the number of slave nodes to reach.interruptIfRunning- if true then nodes can only be stopped once they are idle.- Returns:
- a mapping of node uuids to an eventual exception resulting from invoking this method on the corresponding node.
- Throws:
Exception- if any error occurs.- See Also:
-
provisionSlaveNodes
ResultsMap<String,Void> provisionSlaveNodes(NodeSelector selector, int nbNodes, TypedProperties configOverrides) throws Exception Start or stop the required number of slaves to reach the specified number, using the specified config overrides, on the selected nodes.If
configOverridesis null, then previous overrides are applied, and already running slave nodes do not need to be stopped.- Parameters:
selector- a filter on the nodes attached to the driver, determines the nodes to which this method applies.nbNodes- the number of slave nodes to reach.configOverrides- the configuration overrides to apply.- Returns:
- a mapping of node uuids to an eventual exception resulting from invoking this method on the corresponding node.
- Throws:
Exception- if any error occurs.- See Also:
-
provisionSlaveNodes
ResultsMap<String,Void> provisionSlaveNodes(NodeSelector selector, int nbNodes, boolean interruptIfRunning, TypedProperties configOverrides) throws Exception Start or stop the required number of slaves to reach the specified number, using the specified config overrides, on the selected nodes.If
configOverridesis null, then previous overrides are applied, and already running slave nodes do not need to be stopped.- Parameters:
selector- a filter on the nodes attached to the driver, determines the nodes to which this method applies.nbNodes- the number of slave nodes to reach.interruptIfRunning- if true then nodes can only be stopped once they are idle.configOverrides- the configuration overrides to apply.- Returns:
- a mapping of node uuids to an eventual exception resulting from invoking this method on the corresponding node.
- Throws:
Exception- if any error occurs.- See Also:
-