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 java.lang.Object implements DnsCacheEntry
-
-
Constructor Summary
Constructors Modifier Constructor Description private
DefaultDnsCacheEntry(DefaultDnsCache.DefaultDnsCacheEntry entry)
(package private)
DefaultDnsCacheEntry(java.lang.String hostname, java.lang.Throwable cause)
(package private)
DefaultDnsCacheEntry(java.lang.String hostname, java.net.InetAddress address)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.net.InetAddress
address()
Get the resolved address.java.lang.Throwable
cause()
If the DNS query failed this will provide the rational.(package private) DnsCacheEntry
copyIfNeeded()
boolean
equals(java.lang.Object obj)
int
hashCode()
(package private) java.lang.String
hostname()
java.lang.String
toString()
-
-
-
Constructor Detail
-
DefaultDnsCacheEntry
DefaultDnsCacheEntry(java.lang.String hostname, java.net.InetAddress address)
-
DefaultDnsCacheEntry
DefaultDnsCacheEntry(java.lang.String hostname, java.lang.Throwable cause)
-
DefaultDnsCacheEntry
private DefaultDnsCacheEntry(DefaultDnsCache.DefaultDnsCacheEntry entry)
-
-
Method Detail
-
address
public java.net.InetAddress 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
public java.lang.Throwable 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
java.lang.String hostname()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
copyIfNeeded
DnsCacheEntry copyIfNeeded()
-
-