java.lang.Object
net.i2p.router.transport.ReverseDnsLookup.CacheEntry
- Enclosing class:
ReverseDnsLookup
Cache entry for IP address and hostname mappings.
Constructor Summary
ConstructorsConstructorDescriptionCacheEntry(String ipAddress, String hostname) Creates an entry cached at the current time.CacheEntry(String ipAddress, String hostname, long timestamp) Creates an entry with the given cache timestamp.Method Summary
All MethodsModifier and TypeMethodDescriptionThe cached hostname for the entry.The cached IP address of the entry.The formatted rDNS cache entry.longThe timestamp when the entry was cached.
Constructor Details
CacheEntry
CacheEntry
Creates an entry with the given cache timestamp.- Parameters:
ipAddress- the IP address the entry describeshostname- the resolved host name, stored as "unknown" when nulltimestamp- epoch milliseconds at which the entry was cached, used to expire it
Method Details
getIpAddress
getHostname
The cached hostname for the entry.- Returns:
- the resolved host name, or
"unknown"if the lookup resolved none
getTimestamp
public long getTimestamp()The timestamp when the entry was cached.- Returns:
- the epoch milliseconds at which the entry was cached, used to expire it
getRdnsEntry