Home / Class/ AuthoritativeNameServer Class — netty Architecture

AuthoritativeNameServer Class — netty Architecture

Architecture documentation for the AuthoritativeNameServer class in DnsResolveContext.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  6b6dbdee_b04a_1cf3_d97a_1f91932357e8["AuthoritativeNameServer"]
  21f3aef4_24fe_7168_ea1d_94d7a3f45711["DnsResolveContext.java"]
  6b6dbdee_b04a_1cf3_d97a_1f91932357e8 -->|defined in| 21f3aef4_24fe_7168_ea1d_94d7a3f45711
  5167f7c9_01dd_bfa6_4519_865cd0886ae5["AuthoritativeNameServer()"]
  6b6dbdee_b04a_1cf3_d97a_1f91932357e8 -->|method| 5167f7c9_01dd_bfa6_4519_865cd0886ae5
  e0350c99_d0e1_940e_ab7a_adcee278b115["isRootServer()"]
  6b6dbdee_b04a_1cf3_d97a_1f91932357e8 -->|method| e0350c99_d0e1_940e_ab7a_adcee278b115
  20e320db_4760_d5ed_1331_acfb0409926a["update()"]
  6b6dbdee_b04a_1cf3_d97a_1f91932357e8 -->|method| 20e320db_4760_d5ed_1331_acfb0409926a

Relationship Graph

Source Code

resolver-dns/src/main/java/io/netty/resolver/dns/DnsResolveContext.java lines 1434–1480

    private static final class AuthoritativeNameServer {
        private final int dots;
        private final String domainName;
        final boolean isCopy;
        final String nsName;

        private long ttl;
        private InetSocketAddress address;

        AuthoritativeNameServer next;

        AuthoritativeNameServer(int dots, long ttl, String domainName, String nsName) {
            this.dots = dots;
            this.ttl = ttl;
            this.nsName = nsName;
            this.domainName = domainName;
            isCopy = false;
        }

        AuthoritativeNameServer(AuthoritativeNameServer server) {
            dots = server.dots;
            ttl = server.ttl;
            nsName = server.nsName;
            domainName = server.domainName;
            isCopy = true;
        }

        /**
         * Returns {@code true} if its a root server.
         */
        boolean isRootServer() {
            return dots == 1;
        }

        /**
         * Update the server with the given address and TTL if needed.
         */
        void update(InetSocketAddress address, long ttl) {
            assert this.address == null || this.address.isUnresolved();
            this.address = address;
            this.ttl = min(this.ttl, ttl);
        }

        void update(InetSocketAddress address) {
            update(address, Long.MAX_VALUE);
        }
    }

Frequently Asked Questions

What is the AuthoritativeNameServer class?
AuthoritativeNameServer is a class in the netty codebase, defined in resolver-dns/src/main/java/io/netty/resolver/dns/DnsResolveContext.java.
Where is AuthoritativeNameServer defined?
AuthoritativeNameServer is defined in resolver-dns/src/main/java/io/netty/resolver/dns/DnsResolveContext.java at line 1434.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free