Class FileBasedIPList

java.lang.Object
org.apache.hadoop.util.FileBasedIPList
All Implemented Interfaces:
IPList

public class FileBasedIPList extends Object implements IPList
FileBasedIPList loads a list of subnets in CIDR format and ip addresses from a file. Given an ip address, isIn method returns true if ip belongs to one of the subnets. Thread safe.
  • Constructor Details

    • FileBasedIPList

      public FileBasedIPList(String fileName)
  • Method Details

    • reload

      public FileBasedIPList reload()
    • isIn

      public boolean isIn(String ipAddress)
      Description copied from interface: IPList
      returns true if the ipAddress is in the IPList.
      Specified by:
      isIn in interface IPList
      Parameters:
      ipAddress - ipAddress.
      Returns:
      boolean value indicating whether the ipAddress is in the IPList