Class JPPFNodeAdmin

java.lang.Object
org.jppf.management.JPPFNodeAdmin
All Implemented Interfaces:
Serializable, org.jppf.management.JPPFAdminMBean, org.jppf.management.JPPFNodeAdminMBean

public class JPPFNodeAdmin extends Object implements org.jppf.management.JPPFNodeAdminMBean
Management bean for a JPPF node.
Author:
Laurent Cohen
See Also:
  • Constructor Details

    • JPPFNodeAdmin

      public JPPFNodeAdmin(org.jppf.server.node.JPPFNode node)
      Initialize this node management bean with the specified node.
      Parameters:
      node - the node whose state is monitored.
  • Method Details

    • state

      public org.jppf.management.JPPFNodeState state() throws Exception
      Get the latest state information from the node.
      Specified by:
      state in interface org.jppf.management.JPPFNodeAdminMBean
      Returns:
      a JPPFNodeState information.
      Throws:
      Exception - if any error occurs.
    • updateThreadPoolSize

      public void updateThreadPoolSize(Integer size) throws Exception
      Set the size of the node's thread pool.
      Specified by:
      updateThreadPoolSize in interface org.jppf.management.JPPFNodeAdminMBean
      Parameters:
      size - the size as an int.
      Throws:
      Exception - if any error occurs.
    • systemInformation

      public org.jppf.management.JPPFSystemInformation systemInformation() throws Exception
      Get detailed information about the node's JVM properties, environment variables and runtime information such as memory usage and available processors.
      Specified by:
      systemInformation in interface org.jppf.management.JPPFAdminMBean
      Returns:
      a JPPFSystemInformation instance.
      Throws:
      Exception - if any error occurs.
    • restart

      public void restart() throws Exception
      Restart the node.
      Specified by:
      restart in interface org.jppf.management.JPPFNodeAdminMBean
      Throws:
      Exception - if any error occurs.
    • restart

      public void restart(Boolean interruptIfRunning) throws Exception
      Specified by:
      restart in interface org.jppf.management.JPPFNodeAdminMBean
      Throws:
      Exception
      Since:
      5.0
    • shutdown

      public void shutdown() throws Exception
      Shutdown the node.
      Specified by:
      shutdown in interface org.jppf.management.JPPFNodeAdminMBean
      Throws:
      Exception - if any error occurs.
    • shutdown

      public void shutdown(Boolean interruptIfRunning) throws Exception
      Specified by:
      shutdown in interface org.jppf.management.JPPFNodeAdminMBean
      Throws:
      Exception
      Since:
      5.0
    • reconnect

      public void reconnect(Boolean interrupt) throws Exception
      Specified by:
      reconnect in interface org.jppf.management.JPPFNodeAdminMBean
      Throws:
      Exception
    • resetTaskCounter

      public void resetTaskCounter() throws Exception
      Reset the node's executed tasks counter to zero.
      Specified by:
      resetTaskCounter in interface org.jppf.management.JPPFNodeAdminMBean
      Throws:
      Exception - if any error occurs.
    • setTaskCounter

      public void setTaskCounter(Integer n) throws Exception
      Set the node's executed tasks counter to the specified value.
      Specified by:
      setTaskCounter in interface org.jppf.management.JPPFNodeAdminMBean
      Parameters:
      n - the new value of the task counter.
      Throws:
      Exception - if any error occurs.
    • updateThreadsPriority

      public void updateThreadsPriority(Integer newPriority) throws Exception
      Update the priority of all execution threads.
      Specified by:
      updateThreadsPriority in interface org.jppf.management.JPPFNodeAdminMBean
      Parameters:
      newPriority - the new priority to set.
      Throws:
      Exception - if any error occurs.
    • updateConfiguration

      public void updateConfiguration(Map<Object,Object> configOverrides, Boolean restart, Boolean interruptIfRunning) throws Exception
      Update the configuration properties of the node.
      Specified by:
      updateConfiguration in interface org.jppf.management.JPPFNodeAdminMBean
      Parameters:
      configOverrides - the set of properties to update.
      restart - specifies whether the node should reconnect ot the driver 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.
      Throws:
      Exception - if any error occurs.
      Since:
      5.2
    • updateConfiguration

      public void updateConfiguration(Map<Object,Object> configOverrides, Boolean restart) throws Exception
      Update the configuration properties of the node. This method is equivalent to calling updateConfiguration(configOverrides, restart, true).
      Specified by:
      updateConfiguration in interface org.jppf.management.JPPFNodeAdminMBean
      Parameters:
      configOverrides - the set of properties to update.
      restart - specifies whether the node should be restarted after updating the properties. This parameter only applies when the restart parameter is true.
      Throws:
      Exception - if any error occurs.
    • cancelJob

      public void cancelJob(String jobId, Boolean requeue) throws Exception
      Cancel the job with the specified id.
      Specified by:
      cancelJob in interface org.jppf.management.JPPFNodeAdminMBean
      Parameters:
      jobId - the id of the job to cancel.
      requeue - true if the job should be requeued on the server side, false otherwise.
      Throws:
      Exception - if any error occurs.
    • getDelegationModel

      public org.jppf.classloader.DelegationModel getDelegationModel() throws Exception
      Specified by:
      getDelegationModel in interface org.jppf.management.JPPFNodeAdminMBean
      Throws:
      Exception
    • setDelegationModel

      public void setDelegationModel(org.jppf.classloader.DelegationModel model) throws Exception
      Specified by:
      setDelegationModel in interface org.jppf.management.JPPFNodeAdminMBean
      Throws:
      Exception
    • pendingAction

      public org.jppf.management.NodePendingAction pendingAction()
      Get the current state of the node
      Specified by:
      pendingAction in interface org.jppf.management.JPPFNodeAdminMBean
      Returns:
      a JPPFNodeState instance.
    • cancelPendingAction

      public boolean cancelPendingAction()
      Specified by:
      cancelPendingAction in interface org.jppf.management.JPPFNodeAdminMBean