Package io.netty.resolver.dns
Class DefaultDnsCache.DefaultDnsCacheEntry
java.lang.Object
io.netty.resolver.dns.DefaultDnsCache.DefaultDnsCacheEntry
- All Implemented Interfaces:
DnsCacheEntry
- Enclosing class:
DefaultDnsCache
private static final class DefaultDnsCache.DefaultDnsCacheEntry
extends Object
implements DnsCacheEntry
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
(package private)
DefaultDnsCacheEntry
(String hostname, Throwable cause) (package private)
DefaultDnsCacheEntry
(String hostname, InetAddress address) -
Method Summary
-
Field Details
-
hostname
-
address
-
cause
-
hash
private final int hash
-
-
Constructor Details
-
DefaultDnsCacheEntry
DefaultDnsCacheEntry(String hostname, InetAddress address) -
DefaultDnsCacheEntry
-
DefaultDnsCacheEntry
-
-
Method Details
-
address
Description copied from interface:DnsCacheEntry
Get the resolved address.This may be null if the resolution failed, and in that case
DnsCacheEntry.cause()
will describe the failure.- Specified by:
address
in interfaceDnsCacheEntry
- Returns:
- the resolved address.
-
cause
Description copied from interface:DnsCacheEntry
If the DNS query failed this will provide the rational.- Specified by:
cause
in interfaceDnsCacheEntry
- Returns:
- the rational for why the DNS query failed, or
null
if the query hasn't failed.
-
hostname
String hostname() -
toString
-
hashCode
public int hashCode() -
equals
-
copyIfNeeded
DnsCacheEntry copyIfNeeded()
-