Package org.jppf.management
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetChannels(org.jppf.management.NodeSelector selector) Get a set of channels based on a NodeSelector.getChannels(org.jppf.management.NodeSelector selector, boolean includePeers, boolean forForwarding) Get a set of channels based on a NodeSelector.intgetNbChannels(org.jppf.management.NodeSelector selector, boolean includePeers, boolean forForwarding) Get the number of channels matching a NodeSelector.booleanisNodeAccepted(String nodeUuid, org.jppf.management.NodeSelector selector) booleanisNodeAccepted(BaseNodeContext node, org.jppf.management.NodeSelector selector) Determine whether the specified selector accepts the specified node.
-
Constructor Details
-
NodeSelectionHelper
- Parameters:
driver- reference to the JPPF driver.
-
-
Method Details
-
isNodeAccepted
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
BaseNodeContextinstances.
-
isNodeAccepted
- Specified by:
isNodeAcceptedin interfaceorg.jppf.management.forwarding.NodeSelectionProvider
-
getChannels
Get a set of channels based on a NodeSelector.- Parameters:
selector- the node selector used as a filter.- Returns:
- a set of
BaseNodeContextinstances.
-
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
BaseNodeContextinstances.
-
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
BaseNodeContextinstances.
-