Class DefaultDnsCache.DefaultDnsCacheEntry

    • Field Detail

      • 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 Detail

      • DefaultDnsCacheEntry

        DefaultDnsCacheEntry​(java.lang.String hostname,
                             java.net.InetAddress address)
      • DefaultDnsCacheEntry

        DefaultDnsCacheEntry​(java.lang.String hostname,
                             java.lang.Throwable cause)
    • 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 interface DnsCacheEntry
        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 interface DnsCacheEntry
        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 class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object