Class DnsQueryContextManager

java.lang.Object
io.netty.resolver.dns.DnsQueryContextManager

final class DnsQueryContextManager extends java.lang.Object
  • Field Details

  • Constructor Details

    • DnsQueryContextManager

      DnsQueryContextManager()
  • Method Details

    • add

      int add(java.net.InetSocketAddress nameServerAddr, DnsQueryContext qCtx)
      Add DnsQueryContext to the context manager and return the ID that should be used for the query. This method will return -1 if an ID could not be generated and the context was not stored.
      Parameters:
      nameServerAddr - The InetSocketAddress of the nameserver to query.
      qCtx - The
      invalid @link
      {@link {@link
      DnsQueryContext} to store.
      Returns:
      the ID that should be used or -1 if none could be generated.
    • get

      DnsQueryContext get(java.net.InetSocketAddress nameServerAddr, int id)
      Return the DnsQueryContext for the given InetSocketAddress and id or null if none could be found.
      Parameters:
      nameServerAddr - The InetSocketAddress of the nameserver.
      id - The id that identifies the DnsQueryContext and was used for the query.
      Returns:
      The context or null if none could be found.
    • remove

      DnsQueryContext remove(java.net.InetSocketAddress nameServerAddr, int id)
      Remove the DnsQueryContext for the given InetSocketAddress and id or null if none could be found.
      Parameters:
      nameServerAddr - The InetSocketAddress of the nameserver.
      id - The id that identifies the DnsQueryContext and was used for the query.
      Returns:
      The context or null if none could be removed.
    • getContextMap

      private DnsQueryContextManager.DnsQueryContextMap getContextMap(java.net.InetSocketAddress nameServerAddr)
    • getOrCreateContextMap

      private DnsQueryContextManager.DnsQueryContextMap getOrCreateContextMap(java.net.InetSocketAddress nameServerAddr)
    • toCompactAddress

      private static java.net.Inet6Address toCompactAddress(java.net.Inet4Address a4)
    • toIPv4Address

      private static java.net.Inet4Address toIPv4Address(java.net.Inet6Address a6)