Package org.jitsi.dnssec.validator
Class KeyCache
- java.lang.Object
-
- org.jitsi.dnssec.validator.KeyCache
-
public class KeyCache extends java.lang.ObjectCache for DNSKEY RRsets or corresponding null/bad key entries with a limited size and respect for TTL values.- Author:
- davidb, Ingo Bauersachs
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringMAX_CACHE_SIZE_CONFIGName of the property that configures the maximum cache size.static java.lang.StringMAX_TTL_CONFIGName of the property that configures the maximum cache TTL.
-
Constructor Summary
Constructors Constructor Description KeyCache()Creates a new instance of this class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description KeyEntryfind(org.xbill.DNS.Name n, int dclass)Find the 'closest' trusted DNSKEY rrset to the given name.voidinit(java.util.Properties config)Initialize the cache.KeyEntrystore(KeyEntry ke)Store aKeyEntryin the cache.
-
-
-
Field Detail
-
MAX_TTL_CONFIG
public static final java.lang.String MAX_TTL_CONFIG
Name of the property that configures the maximum cache TTL.- See Also:
- Constant Field Values
-
MAX_CACHE_SIZE_CONFIG
public static final java.lang.String MAX_CACHE_SIZE_CONFIG
Name of the property that configures the maximum cache size.- See Also:
- Constant Field Values
-
-
Method Detail
-
init
public void init(java.util.Properties config)
Initialize the cache. This implementation recognizes the following configuration parameters:- org.jitsi.dnssec.keycache.max_ttl
- The maximum TTL to apply to any cache entry.
- org.jitsi.dnssec.keycache.max_size
- The maximum number of entries that the cache will hold.
- Parameters:
config- The configuration information.
-
find
public KeyEntry find(org.xbill.DNS.Name n, int dclass)
Find the 'closest' trusted DNSKEY rrset to the given name.- Parameters:
n- The name to start the search.dclass- The class this DNSKEY rrset should be in.- Returns:
- The 'closest' entry to 'n' in the same class as 'dclass'.
-
-