org.apache.hadoop.util
Class FileBasedIPList

java.lang.Object
  extended by 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
FileBasedIPList(String fileName)
           
 
Method Summary
 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 © 2014 Apache Software Foundation. All Rights Reserved.