TestAuthoritativeDnsServerCache Class — netty Architecture
Architecture documentation for the TestAuthoritativeDnsServerCache class in DnsNameResolverTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 93112857_adb2_b8c5_f3a6_e97b373db780["TestAuthoritativeDnsServerCache"] a522ba1b_7e05_723d_0457_5085cd62d3eb["DnsNameResolverTest.java"] 93112857_adb2_b8c5_f3a6_e97b373db780 -->|defined in| a522ba1b_7e05_723d_0457_5085cd62d3eb 74623a55_ab18_8b19_86f2_1a37e57c6caa["TestAuthoritativeDnsServerCache()"] 93112857_adb2_b8c5_f3a6_e97b373db780 -->|method| 74623a55_ab18_8b19_86f2_1a37e57c6caa e0db6033_0923_3a43_22a1_11714277de6c["clear()"] 93112857_adb2_b8c5_f3a6_e97b373db780 -->|method| e0db6033_0923_3a43_22a1_11714277de6c 83e599b4_c503_a1db_a49d_ee9281c1e6ab["DnsServerAddressStream()"] 93112857_adb2_b8c5_f3a6_e97b373db780 -->|method| 83e599b4_c503_a1db_a49d_ee9281c1e6ab 320a7bb7_1770_5812_3b9d_752bd44edf24["cache()"] 93112857_adb2_b8c5_f3a6_e97b373db780 -->|method| 320a7bb7_1770_5812_3b9d_752bd44edf24
Relationship Graph
Source Code
resolver-dns/src/test/java/io/netty/resolver/dns/DnsNameResolverTest.java lines 2281–2312
private static final class TestAuthoritativeDnsServerCache implements AuthoritativeDnsServerCache {
final AuthoritativeDnsServerCache cache;
final Map<String, DnsServerAddressStream> cacheHits = new HashMap<String, DnsServerAddressStream>();
TestAuthoritativeDnsServerCache(AuthoritativeDnsServerCache cache) {
this.cache = cache;
}
@Override
public void clear() {
cache.clear();
}
@Override
public boolean clear(String hostname) {
return cache.clear(hostname);
}
@Override
public DnsServerAddressStream get(String hostname) {
DnsServerAddressStream cached = cache.get(hostname);
if (cached != null) {
cacheHits.put(hostname, cached.duplicate());
}
return cached;
}
@Override
public void cache(String hostname, InetSocketAddress address, long originalTtl, EventLoop loop) {
cache.cache(hostname, address, originalTtl, loop);
}
}
Source
Frequently Asked Questions
What is the TestAuthoritativeDnsServerCache class?
TestAuthoritativeDnsServerCache is a class in the netty codebase, defined in resolver-dns/src/test/java/io/netty/resolver/dns/DnsNameResolverTest.java.
Where is TestAuthoritativeDnsServerCache defined?
TestAuthoritativeDnsServerCache is defined in resolver-dns/src/test/java/io/netty/resolver/dns/DnsNameResolverTest.java at line 2281.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free