info.informatica.net
Class SQLDnsCache

java.lang.Object
  extended by info.informatica.util.ObjectCache
      extended by info.informatica.net.SQLDnsCache

public final class SQLDnsCache
extends ObjectCache

SQL-based DNS cache

Version:
1.02
Author:
amengual at informatica dot info

Constructor Summary
SQLDnsCache()
           
 
Method Summary
 void close()
          Closes this cache.
 void init(Properties conf)
           
 DatedContainer<String> lookup(String ip)
           
 String lookupString(String ip)
           
 void put(String ip, DatedContainer<String> dc)
           
 void put(String ip, String name)
           
 void setExpireTime(long t)
          Sets the expire time.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SQLDnsCache

public SQLDnsCache()
Method Detail

init

public void init(Properties conf)
          throws CacheException
Specified by:
init in class ObjectCache
Throws:
CacheException

setExpireTime

public void setExpireTime(long t)
Sets the expire time.

Specified by:
setExpireTime in class ObjectCache
Parameters:
t - the time in seconds.

lookupString

public String lookupString(String ip)
Specified by:
lookupString in class ObjectCache

lookup

public DatedContainer<String> lookup(String ip)
Specified by:
lookup in class ObjectCache

put

public void put(String ip,
                String name)
Specified by:
put in class ObjectCache

put

public void put(String ip,
                DatedContainer<String> dc)
Overrides:
put in class ObjectCache

close

public void close()
           throws CacheException
Description copied from class: ObjectCache
Closes this cache.

Specified by:
close in class ObjectCache
Throws:
CacheException - if a problem arose when attempting to close.