|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.archive.crawler.datamodel.CrawlHost
public class CrawlHost
Represents a single remote "host". An host is a name for which there is a dns record or an IP-address. This might be a machine or a virtual host.
| Field Summary | |
|---|---|
static long |
IP_NEVER_EXPIRES
Flag value indicating always-valid IP |
static long |
IP_NEVER_LOOKED_UP
Flag value indicating an IP has not yet been looked up |
protected CrawlSubstats |
substats
|
| Constructor Summary | |
|---|---|
CrawlHost(java.lang.String hostname)
Create a new CrawlHost object. |
|
CrawlHost(java.lang.String hostname,
java.lang.String countryCode)
Create a new CrawlHost object. |
|
| Method Summary | |
|---|---|
java.lang.String |
getCountryCode()
Get country code of this host |
long |
getEarliestNextURIEmitTime()
Get the earliest time a URI for this host could be emitted. |
java.lang.String |
getHostName()
Get the host name. |
java.net.InetAddress |
getIP()
Get the IP address for this host. |
long |
getIpFetched()
Get the time when the IP address for this host was last looked up. |
long |
getIpTTL()
Get the TTL value from the dns record for this host. |
CrawlSubstats |
getSubstats()
|
boolean |
hasBeenLookedUp()
Return true if the IP for this host has been looked up. |
void |
setCountryCode(java.lang.String countryCode)
Set country code for this hos |
void |
setEarliestNextURIEmitTime(long earliestNextURIEmitTime)
Set the earliest time a URI for this host could be emitted. |
void |
setIP(java.net.InetAddress address,
long ttl)
Set the IP address for this host. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final long IP_NEVER_EXPIRES
public static final long IP_NEVER_LOOKED_UP
protected CrawlSubstats substats
| Constructor Detail |
|---|
public CrawlHost(java.lang.String hostname)
hostname - the host name for this host.
public CrawlHost(java.lang.String hostname,
java.lang.String countryCode)
hostname - the host name for this host.countryCode - the country code for this host.| Method Detail |
|---|
public boolean hasBeenLookedUp()
public void setIP(java.net.InetAddress address,
long ttl)
address - ttl - the TTL from the dns record in seconds or -1 if it should live
forever (is a numeric IP).public java.net.InetAddress getIP()
public long getIpFetched()
public long getIpTTL()
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getHostName()
public long getEarliestNextURIEmitTime()
public void setEarliestNextURIEmitTime(long earliestNextURIEmitTime)
earliestNextURIEmitTime - The earliestNextURIEmitTime to set.public java.lang.String getCountryCode()
public void setCountryCode(java.lang.String countryCode)
countryCode - The country code of this hostpublic CrawlSubstats getSubstats()
getSubstats in interface CrawlSubstats.HasCrawlSubstats
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||