org.apache.nutch.hostdb

## Class HostDatum

- java.lang.Object
- - org.apache.nutch.hostdb.HostDatum

- All Implemented Interfaces:
    java.lang.Cloneable, Writable

      public class HostDatum
      extends java.lang.Object
      implements Writable, java.lang.Cloneable

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected long` | `connectionFailures`
    `protected long` | `dnsFailures`
    `protected long` | `failures`
    `protected long` | `fetched`
    `protected long` | `gone`
    `protected java.lang.String` | `homepageUrl`
    `protected java.util.Date` | `lastCheck`
    `protected MapWritable` | `metaData`
    `protected long` | `notModified`
    `protected long` | `redirPerm`
    `protected long` | `redirTemp`
    `protected float` | `score`
    `protected long` | `unfetched`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `HostDatum()`
    `HostDatum(float score)`
    `HostDatum(float score, java.util.Date lastCheck)`
    `HostDatum(float score, java.util.Date lastCheck, java.lang.String homepageUrl)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Object` | `clone()`
    `java.lang.Long` | `getConnectionFailures()`
    `java.lang.Long` | `getDnsFailures()`
    `long` | `getFetched()`
    `long` | `getGone()`
    `java.lang.String` | `getHomepageUrl()`
    `java.util.Date` | `getLastCheck()`
    `MapWritable` | `getMetaData()` returns a MapWritable if it was set or read in @see readFields(DataInput), returns empty map in case CrawlDatum was freshly created (lazily instantiated).
    `long` | `getNotModified()`
    `long` | `getRedirPerm()`
    `long` | `getRedirTemp()`
    `float` | `getScore()`
    `long` | `getUnfetched()`
    `boolean` | `hasHomepageUrl()`
    `void` | `incConnectionFailures()`
    `void` | `incDnsFailures()`
    `boolean` | `isEmpty()`
    `java.lang.Long` | `numFailures()`
    `java.lang.Long` | `numRecords()`
    `void` | `putAllMetaData(HostDatum other)` Add all metadata from other CrawlDatum to this CrawlDatum.
    `void` | `readFields(java.io.DataInput in)`
    `void` | `resetFailures()`
    `void` | `resetStatistics()`
    `void` | `setConnectionFailures(java.lang.Long connectionFailures)`
    `void` | `setDnsFailures(java.lang.Long dnsFailures)`
    `void` | `setFetched(long val)`
    `void` | `setGone(long val)`
    `void` | `setHomepageUrl(java.lang.String homepageUrl)`
    `void` | `setLastCheck()`
    `void` | `setLastCheck(java.util.Date date)`
    `void` | `setMetaData(MapWritable mapWritable)`
    `void` | `setNotModified(long val)`
    `void` | `setRedirPerm(long val)`
    `void` | `setRedirTemp(long val)`
    `void` | `setScore(float score)`
    `void` | `setUnfetched(long val)`
    `java.lang.String` | `toString()`
    `void` | `write(java.io.DataOutput out)`

    - ### Methods inherited from class java.lang.Object

      `equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### failures

          protected long failures

    - #### score

          protected float score

    - #### lastCheck

          protected java.util.Date lastCheck

    - #### homepageUrl

          protected java.lang.String homepageUrl

    - #### metaData

          protected MapWritable metaData

    - #### dnsFailures

          protected long dnsFailures

    - #### connectionFailures

          protected long connectionFailures

    - #### unfetched

          protected long unfetched

    - #### fetched

          protected long fetched

    - #### notModified

          protected long notModified

    - #### redirTemp

          protected long redirTemp

    - #### redirPerm

          protected long redirPerm

    - #### gone

          protected long gone

  - ### Constructor Detail

    - #### HostDatum

          public HostDatum()

    - #### HostDatum

          public HostDatum(float score)

    - #### HostDatum

          public HostDatum(float score,
                           java.util.Date lastCheck)

    - #### HostDatum

          public HostDatum(float score,
                           java.util.Date lastCheck,
                           java.lang.String homepageUrl)

  - ### Method Detail

    - #### resetFailures

          public void resetFailures()

    - #### setDnsFailures

          public void setDnsFailures(java.lang.Long dnsFailures)

    - #### setConnectionFailures

          public void setConnectionFailures(java.lang.Long connectionFailures)

    - #### incDnsFailures

          public void incDnsFailures()

    - #### incConnectionFailures

          public void incConnectionFailures()

    - #### numFailures

          public java.lang.Long numFailures()

    - #### getDnsFailures

          public java.lang.Long getDnsFailures()

    - #### getConnectionFailures

          public java.lang.Long getConnectionFailures()

    - #### setScore

          public void setScore(float score)

    - #### setLastCheck

          public void setLastCheck()

    - #### setLastCheck

          public void setLastCheck(java.util.Date date)

    - #### isEmpty

          public boolean isEmpty()

    - #### getScore

          public float getScore()

    - #### numRecords

          public java.lang.Long numRecords()

    - #### getLastCheck

          public java.util.Date getLastCheck()

    - #### hasHomepageUrl

          public boolean hasHomepageUrl()

    - #### getHomepageUrl

          public java.lang.String getHomepageUrl()

    - #### setHomepageUrl

          public void setHomepageUrl(java.lang.String homepageUrl)

    - #### setUnfetched

          public void setUnfetched(long val)

    - #### getUnfetched

          public long getUnfetched()

    - #### setFetched

          public void setFetched(long val)

    - #### getFetched

          public long getFetched()

    - #### setNotModified

          public void setNotModified(long val)

    - #### getNotModified

          public long getNotModified()

    - #### setRedirTemp

          public void setRedirTemp(long val)

    - #### getRedirTemp

          public long getRedirTemp()

    - #### setRedirPerm

          public void setRedirPerm(long val)

    - #### getRedirPerm

          public long getRedirPerm()

    - #### setGone

          public void setGone(long val)

    - #### getGone

          public long getGone()

    - #### resetStatistics

          public void resetStatistics()

    - #### setMetaData

          public void setMetaData(MapWritable mapWritable)

    - #### putAllMetaData

          public void putAllMetaData(HostDatum other)

      Add all metadata from other CrawlDatum to this CrawlDatum.
      Parameters:
        `other` - HostDatum

    - #### getMetaData

          public MapWritable getMetaData()

      returns a MapWritable if it was set or read in @see readFields(DataInput), returns empty map in case CrawlDatum was freshly created (lazily instantiated).

    - #### clone

          public java.lang.Object clone()
                                 throws java.lang.CloneNotSupportedException

      Overrides:
        `clone` in class `java.lang.Object`
      Throws:
        `java.lang.CloneNotSupportedException`

    - #### readFields

          public void readFields(java.io.DataInput in)
                          throws java.io.IOException

      Specified by:
        `readFields` in interface `Writable`
      Throws:
        `java.io.IOException`

    - #### write

          public void write(java.io.DataOutput out)
                     throws java.io.IOException

      Specified by:
        `write` in interface `Writable`
      Throws:
        `java.io.IOException`

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

Copyright © 2019 The Apache Software Foundation