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 Details

  • 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 be null, in particular if the invoked method has a void return 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 calling forwardInvoke(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 be null, in particular if the invoked method has a void return 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 JPPFNodeState object, or an exception if the invocation failed for the corresponding node.
      Throws:
      Exception - if any error occurs.
      See Also:
    • updateThreadPoolSize

      ResultsMap<String,Void> updateThreadPoolSize(NodeSelector selector, Integer size) throws Exception
      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

      ResultsMap<String,Void> restart(NodeSelector selector) throws Exception
      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

      ResultsMap<String,Void> restart(NodeSelector selector, Boolean interruptIfRunning) throws Exception
      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

      ResultsMap<String,Void> shutdown(NodeSelector selector) 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.
      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

      ResultsMap<String,Void> resetTaskCounter(NodeSelector selector) throws Exception
      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

      ResultsMap<String,Void> setTaskCounter(NodeSelector selector, Integer n) throws Exception
      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 Exception
      Update 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 - when true, then restart the node even if it is executing tasks, when false, then only shutdown the node when it is no longer executing. This parameter only applies when the restart parameter is true.
      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 Exception
      Update 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

      ResultsMap<String,DelegationModel> getDelegationModel(NodeSelector selector) throws Exception
      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 DelegationModel enum value, or an exception if the invocation failed for the corresponding node.
      Throws:
      Exception - if any error occurs.
      See Also:
    • 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 either PARENT_FIRST or URL_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:
    • systemInformation

      ResultsMap<String,JPPFSystemInformation> systemInformation(NodeSelector selector) throws Exception
      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

      ResultsMap<String,HealthSnapshot> healthSnapshot(NodeSelector selector) throws Exception
      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

      Invoke System.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

      ResultsMap<String,String> heapDump(NodeSelector selector) throws Exception
      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

      ResultsMap<String,ThreadDump> threadDump(NodeSelector selector) throws Exception
      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

      ResultsMap<String,Integer> getNbSlaves(NodeSelector selector) throws Exception
      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 int corresponding 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

      ResultsMap<String,Void> provisionSlaveNodes(NodeSelector selector, int nbNodes) throws Exception
      Start or stop the required number of slaves to reach the specified number on the selected nodes. This is equivalent to calling provisionSlaveNodes(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 configOverrides is 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 configOverrides is 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: