Class CacheableIPList

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

public class CacheableIPList extends Object implements IPList
CacheableIPList loads a list of subnets from a file. The list is cached and the cache can be refreshed by specifying cache timeout. A negative value of cache timeout disables any caching. Thread safe.
  • Constructor Details

    • CacheableIPList

      public CacheableIPList(FileBasedIPList ipList, long cacheTimeout)
  • Method Details

    • refresh

      public void refresh()
      Refreshes the ip list
    • 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