|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.apache.manifoldcf.core.database.BaseTable
org.apache.manifoldcf.crawler.connectors.webcrawler.DNSManager
public class DNSManager
This class manages the database table into which we DNS entries for hosts. The data resides in the database, as well as in cache (up to a certain point). The result is that there is a memory limited, database-backed repository of DNS entries that we can draw on. Note that this code is also responsible for efficiently caching the mapping of IP address to a canonical host name.
| Nested Class Summary | |
|---|---|
protected static class |
DNSManager.DNSCacheClass
Cache class for robots. |
protected static class |
DNSManager.DNSInfo
This is a cached data item. |
protected static class |
DNSManager.HostDescription
This is the object description for a robots host object. |
protected static class |
DNSManager.HostExecutor
This is the executor object for locating robots host objects. |
| Field Summary | |
|---|---|
static java.lang.String |
_rcsid
|
protected static DNSManager.DNSCacheClass |
dnsCacheClass
|
protected static java.lang.String |
expirationField
|
protected static java.lang.String |
fqdnField
|
protected static java.lang.String |
hostField
|
protected static java.lang.String |
ipaddressField
|
| Fields inherited from class org.apache.manifoldcf.core.database.BaseTable |
|---|
dbInterface, tableName |
| Constructor Summary | |
|---|---|
DNSManager(org.apache.manifoldcf.core.interfaces.IThreadContext tc,
org.apache.manifoldcf.core.interfaces.IDBInterface database)
Constructor. |
|
| Method Summary | |
|---|---|
void |
deinstall()
Uninstall the manager. |
protected static java.lang.String |
getDNSKey(java.lang.String hostName)
Construct a key which represents an individual host name. |
void |
install()
Install the manager. |
DNSManager.DNSInfo |
lookup(java.lang.String hostName,
long currentTime)
Given a host name, look up the ip address and fqdn. |
protected DNSManager.DNSInfo |
readDNSInfo(java.lang.String hostName)
Read DNS data, if it exists. |
void |
writeDNSData(java.lang.String hostName,
java.lang.String fqdn,
java.lang.String ipaddress,
long expirationTime)
Write DNS data, replacing any existing row. |
| Methods inherited from class org.apache.manifoldcf.core.database.BaseTable |
|---|
addTableIndex, analyzeTable, beginTransaction, constructDistinctOnClause, constructOffsetLimitClause, constructRegexpClause, constructSubstringClause, endTransaction, getDatabaseCacheKey, getDBInterface, getMaxInClause, getMaxOrClause, getTableIndexes, getTableName, getTableSchema, getTransactionID, makeTableKey, noteModifications, performAddIndex, performAlter, performCreate, performDelete, performDrop, performInsert, performLock, performModification, performQuery, performQuery, performRemoveIndex, performUpdate, prepareRowForSave, readRow, reindexTable, signalRollback |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String _rcsid
protected static DNSManager.DNSCacheClass dnsCacheClass
protected static final java.lang.String hostField
protected static final java.lang.String fqdnField
protected static final java.lang.String ipaddressField
protected static final java.lang.String expirationField
| Constructor Detail |
|---|
public DNSManager(org.apache.manifoldcf.core.interfaces.IThreadContext tc,
org.apache.manifoldcf.core.interfaces.IDBInterface database)
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
tc - is the thread context.database - is the database handle.
org.apache.manifoldcf.core.interfaces.ManifoldCFException| Method Detail |
|---|
public void install()
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
org.apache.manifoldcf.core.interfaces.ManifoldCFException
public void deinstall()
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
org.apache.manifoldcf.core.interfaces.ManifoldCFException
public DNSManager.DNSInfo lookup(java.lang.String hostName,
long currentTime)
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
org.apache.manifoldcf.core.interfaces.ManifoldCFException
public void writeDNSData(java.lang.String hostName,
java.lang.String fqdn,
java.lang.String ipaddress,
long expirationTime)
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
hostName - is the host.fqdn - is the canonical host name.ipaddress - is the host ip address, in standard form.expirationTime - is the time this data should expire.
org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionprotected static java.lang.String getDNSKey(java.lang.String hostName)
hostName - is the name of the connector.
protected DNSManager.DNSInfo readDNSInfo(java.lang.String hostName)
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
org.apache.manifoldcf.core.interfaces.ManifoldCFException
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||