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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FileBasedIPList
public FileBasedIPList(String fileName)
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.