Home / Class/ NoopDnsCache Class — netty Architecture

NoopDnsCache Class — netty Architecture

Architecture documentation for the NoopDnsCache class in NoopDnsCache.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  74b01694_0f1a_bd99_7b9f_513b8367db84["NoopDnsCache"]
  e9ad3085_f550_cdfe_25e1_444cb2c16823["NoopDnsCache.java"]
  74b01694_0f1a_bd99_7b9f_513b8367db84 -->|defined in| e9ad3085_f550_cdfe_25e1_444cb2c16823
  637f539c_bedc_055e_3f4f_5a201711cfa4["NoopDnsCache()"]
  74b01694_0f1a_bd99_7b9f_513b8367db84 -->|method| 637f539c_bedc_055e_3f4f_5a201711cfa4
  867d8cc1_dd08_ec3f_a6e9_3d297e145038["clear()"]
  74b01694_0f1a_bd99_7b9f_513b8367db84 -->|method| 867d8cc1_dd08_ec3f_a6e9_3d297e145038
  9e184f03_c1db_03d6_9687_bfe703fe315d["get()"]
  74b01694_0f1a_bd99_7b9f_513b8367db84 -->|method| 9e184f03_c1db_03d6_9687_bfe703fe315d
  d5073863_4ffb_8482_4db9_d9855f42a128["DnsCacheEntry()"]
  74b01694_0f1a_bd99_7b9f_513b8367db84 -->|method| d5073863_4ffb_8482_4db9_d9855f42a128
  4d94e8ae_8012_dbc8_b2b6_a858c255676a["String()"]
  74b01694_0f1a_bd99_7b9f_513b8367db84 -->|method| 4d94e8ae_8012_dbc8_b2b6_a858c255676a

Relationship Graph

Source Code

resolver-dns/src/main/java/io/netty/resolver/dns/NoopDnsCache.java lines 28–90

public final class NoopDnsCache implements DnsCache {

    public static final NoopDnsCache INSTANCE = new NoopDnsCache();

    /**
     * Private singleton constructor.
     */
    private NoopDnsCache() {
    }

    @Override
    public void clear() {
    }

    @Override
    public boolean clear(String hostname) {
        return false;
    }

    @Override
    public List<? extends DnsCacheEntry> get(String hostname, DnsRecord[] additionals) {
        return Collections.emptyList();
    }

    @Override
    public DnsCacheEntry cache(String hostname, DnsRecord[] additional,
                               InetAddress address, long originalTtl, EventLoop loop) {
        return new NoopDnsCacheEntry(address);
    }

    @Override
    public DnsCacheEntry cache(String hostname, DnsRecord[] additional, Throwable cause, EventLoop loop) {
        return null;
    }

    @Override
    public String toString() {
        return NoopDnsCache.class.getSimpleName();
    }

    private static final class NoopDnsCacheEntry implements DnsCacheEntry {
        private final InetAddress address;

        NoopDnsCacheEntry(InetAddress address) {
            this.address = address;
        }

        @Override
        public InetAddress address() {
            return address;
        }

        @Override
        public Throwable cause() {
            return null;
        }

        @Override
        public String toString() {
            return address.toString();
        }
    }
}

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free