Class AbstractIsInIPSubnet<P extends AbstractIPAddressPattern>

java.lang.Object
org.jppf.node.policy.ExecutionPolicy
org.jppf.node.policy.AbstractIsInIPSubnet<P>
Type Parameters:
P - the type of pattern handled by this class.
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
IsInIPv4Subnet, IsInIPv6Subnet

public abstract class AbstractIsInIPSubnet<P extends AbstractIPAddressPattern> extends ExecutionPolicy
Common abstract super class for execution policy rules that encapsulate a test of type IP is in Subnet string.
Author:
Daniel Widdis, Laurent Cohen
See Also:
  • Constructor Details

    • AbstractIsInIPSubnet

      public AbstractIsInIPSubnet(String... subnets)
      Define a membership test using ipv4.addresses property to determine if a node or driver is in one of the specified subnets.
      Parameters:
      subnets - One or more strings representing either a valid IP subnet in CIDR notation or IP address range pattern as defined in IPv4AddressPattern or IPv6AddressPattern
    • AbstractIsInIPSubnet

      public AbstractIsInIPSubnet(Collection<String> subnets)
      Define a membership test using ipv6.addresses property to determine if a node is in one of the specified subnets.
      Parameters:
      subnets - One or more strings representing either a valid IP subnet in CIDR notation or IP address range pattern as defined in IPv4AddressPattern or IPv6AddressPattern
  • Method Details

    • accepts

      public boolean accepts(PropertiesCollection<String> info)
      Determines whether this policy accepts the specified node.
      Specified by:
      accepts in class ExecutionPolicy
      Parameters:
      info - system information for the node on which the tasks will run if accepted.
      Returns:
      true if the node is accepted, false otherwise.
    • toString

      public String toString(int n)
      Description copied from class: ExecutionPolicy
      Get an xml string representation of this policy with the specified starting indentation level.
      Specified by:
      toString in class ExecutionPolicy
      Parameters:
      n - the size of the indent to startwith.
      Returns:
      an indented string depending on the value of toStringIndent.