Interface JPPFDriverAdminMBean

All Superinterfaces:
JPPFAdminMBean, Serializable
All Known Implementing Classes:
JMXDriverConnectionWrapper

public interface JPPFDriverAdminMBean extends JPPFAdminMBean
MBean interface for the management of a JPPF driver.
Author:
Laurent Cohen
  • Field Details

  • Method Details

    • statistics

      JPPFStatistics statistics() throws Exception
      Get the latest statistics snapshot from the JPPF driver.
      Returns:
      a JPPFStatistics instance.
      Throws:
      Exception - if any error occurs.
    • nbNodes

      Integer nbNodes() throws Exception
      Get the number of nodes attached to the driver. Note that this method is equivalent to calling nbNodes(null).
      Returns:
      the number of nodes, or -1 if information on the nodes could not be retrieved. The returned number does not include peer drivers.
      Throws:
      Exception - if any error occurs.
    • nbNodes

      Integer nbNodes(NodeSelector selector) throws Exception
      Get the number of nodes attached to the driver that satisfy the specified selector.
      Parameters:
      selector - specifies which nodes shouyld be counted. If null, then NodeSelector.ALL_NODES will be used.
      Returns:
      the number of nodes, or -1 if information on the nodes could not be retrieved. The returned number does not include peer drivers.
      Throws:
      Exception - if any error occurs.
      Since:
      5.0
    • nodesInformation

      Collection<JPPFManagementInfo> nodesInformation() throws Exception
      Request the JMX connection information for all the nodes attached to the server. Note that this method is equivalent to calling nodesInformation(null, false).
      Returns:
      a collection of JPPFManagementInfo instances, or null if information on the nodes could not be retrieved.
      Throws:
      Exception - if any error occurs.
    • nodesInformation

      Collection<JPPFManagementInfo> nodesInformation(NodeSelector selector) throws Exception
      Request the JMX connection information for all the nodes attached to the server which satisfy the specified selector. Note that this method is equivalent to calling nodesInformation(selector, false).
      Parameters:
      selector - specifies which nodes shouyld be counted. If null, then NodeSelector.ALL_NODES will be used.
      Returns:
      a collection of JPPFManagementInfo instances, or null if information on the nodes could not be retrieved.
      Throws:
      Exception - if any error occurs.
    • nodesInformation

      Collection<JPPFManagementInfo> nodesInformation(NodeSelector selector, boolean includePeers) throws Exception
      Request the JMX connection information for all the nodes attached to the server which satisfy the specified selector.
      Parameters:
      selector - specifies which nodes shouyld be counted. If null, then NodeSelector.ALL_NODES will be used.
      includePeers - whether peer drivers should be counted as nodes and included.
      Returns:
      a collection of JPPFManagementInfo instances, or null if information on the nodes could not be retrieved.
      Throws:
      Exception - if any error occurs.
    • restartShutdown

      String restartShutdown(Long shutdownDelay, Long restartDelay) throws Exception
      Perform a shutdown or restart of the server.
      Parameters:
      shutdownDelay - the delay before shutting down the server, once the command is received.
      restartDelay - the delay before restarting, once the server is shutdown. If it is < 0, no restart occurs.
      Returns:
      an acknowledgement message.
      Throws:
      Exception - if any error occurs.
    • changeLoadBalancerSettings

      String changeLoadBalancerSettings(String algorithm, Map<Object,Object> parameters) throws Exception
      Change the bundle size tuning settings.
      Parameters:
      algorithm - the name opf the load-balancing algorithm to set.
      parameters - the algorithm's parameters.
      Returns:
      an acknowledgement or error message.
      Throws:
      Exception - if an error occurred while updating the settings.
    • loadBalancerInformation

      LoadBalancingInformation loadBalancerInformation() throws Exception
      Obtain the current load-balancing settings.
      Returns:
      an instance of LoadBalancingInformation.
      Throws:
      Exception - if an error occurred while fetching the settings.
    • resetStatistics

      void resetStatistics() throws Exception
      Reset this server's statistics. This method triggers a reset() event via the JPPFDriverStatsManager instance.
      Throws:
      Exception - if any error occurs.
    • nbIdleNodes

      Integer nbIdleNodes() throws Exception
      Get the number of nodes currently idle. Note that this method is equivalent to calling nbIdleNodes(null).
      Returns:
      the number of idle nodes, or -1 if information on the nodes could not be retrieved. The returned number does not include peer drivers.
      Throws:
      Exception - if any error occurs.
    • nbIdleNodes

      Integer nbIdleNodes(NodeSelector selector) throws Exception
      Get the number of idle nodes attached to the driver that satisfy the specified selector.
      Parameters:
      selector - specifies which nodes should be counted. If null, then NodeSelector.ALL_NODES will be used.
      Returns:
      the number of idle nodes, or -1 if information on the nodes could not be retrieved. The returned number does not include peer drivers.
      Throws:
      Exception - if any error occurs.
      Since:
      5.0
    • nbIdleNodes

      Integer nbIdleNodes(NodeSelector selector, boolean includePeers) throws Exception
      Get the number of idle nodes attached to the driver that satisfy the specified selector.
      Parameters:
      selector - specifies which nodes should be counted. If null, then NodeSelector.ALL_NODES will be used.
      includePeers - whether peer drivers should be counted as nodes and included.
      Returns:
      the number of idle nodes, or -1 if information on the nodes could not be retrieved. The returned number does not include peer drivers.
      Throws:
      Exception - if any error occurs.
      Since:
      5.0
    • idleNodesInformation

      Collection<JPPFManagementInfo> idleNodesInformation() throws Exception
      Request the JMX connection information for all the idle nodes attached to the server. Note that this method is equivalent to calling idleNodesInformation(null).
      Returns:
      a collection of JPPFManagementInfo instances, or null if information on the nodes could not be retrieved.
      Throws:
      Exception - if any error occurs.
    • idleNodesInformation

      Collection<JPPFManagementInfo> idleNodesInformation(NodeSelector selector) throws Exception
      Request the JMX connection information for all the idle nodes attached to the server which satisfy the specified selector.
      Parameters:
      selector - specifies which nodes shouyld be counted. If null, then NodeSelector.ALL_NODES will be used.
      Returns:
      a collection of JPPFManagementInfo instances, or null if information on the nodes could not be retrieved.
      Throws:
      Exception - if any error occurs.
    • toggleActiveState

      void toggleActiveState(NodeSelector selector) throws Exception
      Toggle the activate state of the specified nodes. Nodes in 'active' state will be deactivated, nodes in 'inactive' state will be activated.
      Parameters:
      selector - determines which nodes will be activated or deactivated. If null, then NodeSelector.ALL_NODES will be used.
      Throws:
      Exception - if any error occurs.
    • getActiveState

      Map<String,Boolean> getActiveState(NodeSelector selector) throws Exception
      Get the active states of the nodes specified vith a NodeSelector.
      Parameters:
      selector - specifies for which nodes to retrieve the active states. If null, then NodeSelector.ALL_NODES will be used.
      Returns:
      a mmaping of node uuids to their active state.
      Throws:
      Exception - if any error occurs.
    • setActiveState

      void setActiveState(NodeSelector selector, boolean active) throws Exception
      Set the active state of the specified nodes.
      Parameters:
      selector - determines which nodes will be activated or deactivated. If null, then NodeSelector.ALL_NODES will be used.
      active - specifies the activer state to set on the selected nodes.
      Throws:
      Exception - if any error occurs.
    • setBroadcasting

      void setBroadcasting(boolean broadcasting) throws Exception
      Activate or deactivate the broadcasting of the driver's connection information. if the broadcast is already in the desired state, this method has no effect.
      Parameters:
      broadcasting - true to activate the broadcast, false to deactivate it.
      Throws:
      Exception - if any error occurs.
    • getBroadcasting

      boolean getBroadcasting() throws Exception
      Determine whether the driver is broadcasting or not.
      Returns:
      true if the broadcasting service is on, false if it is off.
      Throws:
      Exception - if any error occurs.