org.apache.hadoop.util
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.
Method Summary |
boolean |
isIn(String ipAddress)
returns true if the ipAddress is in the IPList. |
void |
refresh()
Refreshes the ip list |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CacheableIPList
public CacheableIPList(FileBasedIPList ipList,
long cacheTimeout)
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
- Returns:
- boolean value indicating whether the ipAddress is in the IPList
Copyright © 2014 Apache Software Foundation. All Rights Reserved.