Class NodeSelectionHelper

java.lang.Object
org.jppf.management.NodeSelectionHelper
All Implemented Interfaces:
org.jppf.management.forwarding.NodeSelectionProvider

public class NodeSelectionHelper extends Object implements org.jppf.management.forwarding.NodeSelectionProvider
Author:
Laurent Cohen
  • Constructor Details

    • NodeSelectionHelper

      public NodeSelectionHelper(JPPFDriver driver)
      Parameters:
      driver - reference to the JPPF driver.
  • Method Details

    • isNodeAccepted

      public boolean isNodeAccepted(BaseNodeContext node, org.jppf.management.NodeSelector selector)
      Determine whether the specified selector accepts the specified node.
      Parameters:
      node - the node to check.
      selector - the node selector used as a filter.
      Returns:
      a set of BaseNodeContext instances.
    • isNodeAccepted

      public boolean isNodeAccepted(String nodeUuid, org.jppf.management.NodeSelector selector)
      Specified by:
      isNodeAccepted in interface org.jppf.management.forwarding.NodeSelectionProvider
    • getChannels

      public Set<BaseNodeContext> getChannels(org.jppf.management.NodeSelector selector)
      Get a set of channels based on a NodeSelector.
      Parameters:
      selector - the node selector used as a filter.
      Returns:
      a set of BaseNodeContext instances.
    • getChannels

      public Set<BaseNodeContext> getChannels(org.jppf.management.NodeSelector selector, boolean includePeers, boolean forForwarding)
      Get a set of channels based on a NodeSelector.
      Parameters:
      selector - the node selector used as a filter.
      includePeers - whether peer drivers should be counted as nodes and included.
      forForwarding - whether this is for a node forwarding request, in which case only nodes with a working jmx connection are selected.
      Returns:
      a set of BaseNodeContext instances.
    • getNbChannels

      public int getNbChannels(org.jppf.management.NodeSelector selector, boolean includePeers, boolean forForwarding)
      Get the number of channels matching a NodeSelector.
      Parameters:
      selector - the node selector used as a filter.
      includePeers - whether peer drivers should be counted as nodes and included.
      forForwarding - whether this is for a node forwarding request, in which case only nodes with a working jmx connection are selected.
      Returns:
      a set of BaseNodeContext instances.