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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal CachedDnsQueryResult
get
(DnsMessage query) Request a cached dns response.protected abstract CachedDnsQueryResult
getNormalized
(DnsMessage normalizedQuery) abstract void
offer
(DnsMessage query, DnsQueryResult result, DnsName authoritativeZone) final void
put
(DnsMessage query, DnsQueryResult result) Add an an dns answer/response for a given dns question.protected abstract void
putNormalized
(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
-