| |
|
| java.lang.Object org.archive.crawler.datamodel.CrawlHost
CrawlHost | public class CrawlHost implements Serializable,CrawlSubstats.HasCrawlSubstats(Code) | | 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.
author: gojomo |
IP_NEVER_EXPIRES | final public static long IP_NEVER_EXPIRES(Code) | | Flag value indicating always-valid IP
|
IP_NEVER_LOOKED_UP | final public static long IP_NEVER_LOOKED_UP(Code) | | Flag value indicating an IP has not yet been looked up
|
CrawlHost | public CrawlHost(String hostname)(Code) | | Create a new CrawlHost object.
Parameters: hostname - the host name for this host. |
CrawlHost | public CrawlHost(String hostname, String countryCode)(Code) | | Create a new CrawlHost object.
Parameters: hostname - the host name for this host. Parameters: countryCode - the country code for this host. |
getCountryCode | public String getCountryCode()(Code) | | Get country code of this host
Retruns country code or null if not availabe |
getEarliestNextURIEmitTime | public long getEarliestNextURIEmitTime()(Code) | | Get the earliest time a URI for this host could be emitted.
This only has effect if constraints on bandwidth per host is set.
Returns the earliestNextURIEmitTime. |
getHostName | public String getHostName()(Code) | | Get the host name.
Returns the host name. |
getIP | public InetAddress getIP()(Code) | | Get the IP address for this host.
the IP address for this host. |
getIpFetched | public long getIpFetched()(Code) | | Get the time when the IP address for this host was last looked up.
the time when the IP address for this host was last looked up. |
getIpTTL | public long getIpTTL()(Code) | | Get the TTL value from the dns record for this host.
the TTL value from the dns record for this host -- in seconds --or -1 if this lookup should be valid forever (numeric ip). |
hasBeenLookedUp | public boolean hasBeenLookedUp()(Code) | | Return true if the IP for this host has been looked up.
Returns true even if the lookup failed.
true if the IP for this host has been looked up. |
setCountryCode | public void setCountryCode(String countryCode)(Code) | | Set country code for this hos
Parameters: countryCode - The country code of this host |
setEarliestNextURIEmitTime | public void setEarliestNextURIEmitTime(long earliestNextURIEmitTime)(Code) | | Set the earliest time a URI for this host could be emitted.
This only has effect if constraints on bandwidth per host is set.
Parameters: earliestNextURIEmitTime - The earliestNextURIEmitTime to set. |
setIP | public void setIP(InetAddress address, long ttl)(Code) | | Set the IP address for this host.
Parameters: address - Parameters: ttl - the TTL from the dns record in seconds or -1 if it should liveforever (is a numeric IP). |
|
|
|