org.apache.hadoop.util

## 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 Summary

    Constructors
    Constructor and Description
    `FileBasedIPList(String fileName)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `isIn(String ipAddress)` returns true if the ipAddress is in the IPList.
    `FileBasedIPList` | `reload()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### FileBasedIPList

          public FileBasedIPList(String fileName)

  - ### Method Detail

    - #### 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`
      Returns:
        boolean value indicating whether the ipAddress is in the IPList

Copyright © 2008–2022 Apache Software Foundation. All rights reserved.