anon.tor.util
Class DNSCacheEntry

java.lang.Object
  extended by anon.infoservice.AbstractDatabaseEntry
      extended by anon.tor.util.DNSCacheEntry

public class DNSCacheEntry
extends AbstractDatabaseEntry

Author:
stefan

Field Summary
private  java.lang.String m_Id
           
private  java.lang.String m_Ip
           
private  long m_lastUpdate
           
 
Fields inherited from class anon.infoservice.AbstractDatabaseEntry
XML_LAST_UPDATE
 
Constructor Summary
DNSCacheEntry(java.lang.String id, java.lang.String ip, long a_expireTime)
          Constructor
 
Method Summary
 java.lang.String getId()
          Returns a unique ID for a database entry.
 java.lang.String getIp()
          gets the IP of the entry
 long getLastUpdate()
          Returns the time in milliseconds when this db entry was created from the origin instance.
 long getVersionNumber()
          Returns version number which is used to determine the more recent infoservice entry, if two entries are compared (higher version number -> more recent entry).
 
Methods inherited from class anon.infoservice.AbstractDatabaseEntry
getCreationTime, getExpireTime, isNewerThan, isUserDefined, resetCreationTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_Id

private java.lang.String m_Id

m_Ip

private java.lang.String m_Ip

m_lastUpdate

private long m_lastUpdate
Constructor Detail

DNSCacheEntry

public DNSCacheEntry(java.lang.String id,
                     java.lang.String ip,
                     long a_expireTime)
Constructor

Parameters:
id - id
ip - ip
a_expireTime - expire Time
Method Detail

getId

public java.lang.String getId()
Description copied from class: AbstractDatabaseEntry
Returns a unique ID for a database entry.

Specified by:
getId in class AbstractDatabaseEntry
Returns:
The ID of this database entry.

getIp

public java.lang.String getIp()
gets the IP of the entry

Returns:
IP

getVersionNumber

public long getVersionNumber()
Description copied from class: AbstractDatabaseEntry
Returns version number which is used to determine the more recent infoservice entry, if two entries are compared (higher version number -> more recent entry).

Specified by:
getVersionNumber in class AbstractDatabaseEntry
Returns:
The version number for this entry.

getLastUpdate

public long getLastUpdate()
Description copied from class: AbstractDatabaseEntry
Returns the time in milliseconds when this db entry was created from the origin instance.

Specified by:
getLastUpdate in class AbstractDatabaseEntry
Returns:
the time in milliseconds when this db entry was created from the origin instance