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 java.lang.Object
implements DnsCacheEntry
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate(package private)DefaultDnsCacheEntry(java.lang.String hostname, java.lang.Throwable cause) (package private)DefaultDnsCacheEntry(java.lang.String hostname, java.net.InetAddress address) -
Method Summary
Modifier and TypeMethodDescriptionjava.net.InetAddressaddress()Get the resolved address.java.lang.Throwablecause()If the DNS query failed this will provide the rational.(package private) DnsCacheEntrybooleanequals(java.lang.Object obj) inthashCode()(package private) java.lang.Stringhostname()java.lang.StringtoString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Field Details
-
hostname
private final java.lang.String hostname -
address
private final java.net.InetAddress address -
cause
private final java.lang.Throwable cause -
hash
private final int hash
-
-
Constructor Details
-
DefaultDnsCacheEntry
DefaultDnsCacheEntry(java.lang.String hostname, java.net.InetAddress address) -
DefaultDnsCacheEntry
DefaultDnsCacheEntry(java.lang.String hostname, java.lang.Throwable cause) -
DefaultDnsCacheEntry
-
-
Method Details
-
address
public java.net.InetAddress address()Description copied from interface:DnsCacheEntryGet the resolved address.This may be null if the resolution failed, and in that case
DnsCacheEntry.cause()will describe the failure.- Specified by:
addressin interfaceDnsCacheEntry- Returns:
- the resolved address.
-
cause
public java.lang.Throwable cause()Description copied from interface:DnsCacheEntryIf the DNS query failed this will provide the rational.- Specified by:
causein interfaceDnsCacheEntry- Returns:
- the rational for why the DNS query failed, or
nullif the query hasn't failed.
-
hostname
java.lang.String hostname() -
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-
hashCode
public int hashCode()- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj) - Overrides:
equalsin classjava.lang.Object
-
copyIfNeeded
DnsCacheEntry copyIfNeeded()
-