Package org.minidns
Class DnsCache
- java.lang.Object
-
- org.minidns.DnsCache
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_CACHE_SIZE
-
Constructor Summary
Constructors Constructor Description DnsCache()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description CachedDnsQueryResult
get(DnsMessage query)
Request a cached dns response.protected abstract CachedDnsQueryResult
getNormalized(DnsMessage normalizedQuery)
abstract void
offer(DnsMessage query, DnsQueryResult result, DnsName authoritativeZone)
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 Detail
-
DEFAULT_CACHE_SIZE
public static final int DEFAULT_CACHE_SIZE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DnsCache
public DnsCache()
-
-
Method Detail
-
put
public final void put(DnsMessage query, DnsQueryResult result)
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
protected abstract void putNormalized(DnsMessage normalizedQuery, DnsQueryResult result)
-
offer
public abstract void offer(DnsMessage query, DnsQueryResult result, DnsName authoritativeZone)
-
get
public final CachedDnsQueryResult get(DnsMessage query)
Request a cached dns response.- Parameters:
query
- The query message containing a question.- Returns:
- The dns message.
-
getNormalized
protected abstract CachedDnsQueryResult getNormalized(DnsMessage normalizedQuery)
-
-