|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--org.xbill.DNS.NameSet
|
+--org.xbill.DNS.Cache
A cache of DNS records. The cache obeys TTLs, so items are purged after their validity period is complete. Negative answers are cached, to avoid repeated failed DNS queries. The credibility of each RRset is maintained, so that more credible records replace less credible records, and lookups can specify the minimum credibility of data they are requesting.
RRset,
Credibility| Constructor Summary | |
Cache()
Creates an empty Cache |
|
Cache(String file)
Creates a Cache which initially contains all records in the specified file |
|
| Method Summary | |
void |
addMessage(Message in)
Adds all data from a Message into the Cache. |
void |
addNegative(Name name,
short type,
short dclass,
int ttl,
byte cred,
Object o)
Adds a negative entry to the Cache |
void |
addRecord(Record r,
byte cred,
Object o)
Adds a record to the Cache |
void |
addRRset(RRset rrset,
byte cred,
Object o)
Adds an RRset to the Cache |
void |
clearCache()
Empties the Cache |
RRset[] |
findAnyRecords(Name name,
short type,
short dclass)
Looks up Records in the Cache (a wrapper around lookupRecords). |
RRset[] |
findRecords(Name name,
short type,
short dclass)
Looks up credible Records in the Cache (a wrapper around lookupRecords). |
SetResponse |
lookupRecords(Name name,
short type,
short dclass,
byte minCred)
Looks up Records in the Cache. |
void |
setCleanInterval(int minutes)
Sets the interval (in minutes) that all expired records will be expunged the cache. |
void |
setMaxNCache(int seconds)
Sets the maximum length of time that a negative response will be stored in this Cache. |
void |
setSecurePolicy()
Mandates that all data stored in this Cache must be verified and proven to be secure, using a verifier (as defined in setVerifier). |
void |
setVerifier(Verifier v)
Defines a module to be used for data verification (DNSSEC). |
| Methods inherited from class org.xbill.DNS.NameSet |
addSet,
clear,
findExactSet,
findName,
findSets,
removeName,
removeSet,
toString |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Constructor Detail |
public Cache()
public Cache(String file)
throws IOException
| Method Detail |
public void clearCache()
public void addRecord(Record r,
byte cred,
Object o)
r - The record to be addedcred - The credibility of the recordo - The source of the record (this could be a Message, for example)
public void addRRset(RRset rrset,
byte cred,
Object o)
r - The RRset to be addedcred - The credibility of these recordso - The source of this RRset (this could be a Message, for example)RRset
public void addNegative(Name name,
short type,
short dclass,
int ttl,
byte cred,
Object o)
name - The name of the negative entrytype - The type of the negative entrydclass - The class of the negative entryttl - The ttl of the negative entrycred - The credibility of the negative entryo - The source of this data
public SetResponse lookupRecords(Name name,
short type,
short dclass,
byte minCred)
name - The name to look uptype - The type to look updclass - The class to look upminCred - The minimum acceptable credibilitySetResponse,
Credibility
public RRset[] findRecords(Name name,
short type,
short dclass)
name - The name to look uptype - The type to look updclass - The class to look upCredibility
public RRset[] findAnyRecords(Name name,
short type,
short dclass)
name - The name to look uptype - The type to look updclass - The class to look upCredibilitypublic void addMessage(Message in)
in - The Message to be addedMessagepublic void setVerifier(Verifier v)
public void setSecurePolicy()
public void setMaxNCache(int seconds)
public void setCleanInterval(int minutes)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||