Package org.minidns
Class DnsCache
java.lang.Object
org.minidns.DnsCache
- Direct Known Subclasses:
LruCache
Cache for DNS Entries. Implementations must be thread safe.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal CachedDnsQueryResultget(DnsMessage query) Request a cached dns response.protected abstract CachedDnsQueryResultgetNormalized(DnsMessage normalizedQuery) abstract voidoffer(DnsMessage query, DnsQueryResult result, DnsName authoritativeZone) final voidput(DnsMessage query, DnsQueryResult result) Add an an dns answer/response for a given dns question.protected abstract voidputNormalized(DnsMessage normalizedQuery, DnsQueryResult result)
-
Field Details
-
DEFAULT_CACHE_SIZE
- See Also:
-
-
Constructor Details
-
DnsCache
public DnsCache()
-
-
Method Details
-
put
Add an an dns answer/response for a given dns question. Implementations should honor the ttl / receive timestamp.- Parameters:
query- The query message containing a question.result- The DNS query result.
-
putNormalized
-
offer
-
get
Request a cached dns response.- Parameters:
query- The query message containing a question.- Returns:
- The dns message.
-
getNormalized
-