org.apache.nutch.storage

## Class Host

- java.lang.Object
- - org.apache.avro.specific.SpecificRecordBase
  - - org.apache.gora.persistency.impl.PersistentBase
    - - org.apache.nutch.storage.Host

- All Implemented Interfaces:
    java.io.Externalizable, java.io.Serializable, java.lang.Comparable<org.apache.avro.specific.SpecificRecord>, org.apache.avro.generic.GenericContainer, org.apache.avro.generic.GenericRecord, org.apache.avro.generic.IndexedRecord, org.apache.avro.specific.SpecificRecord, org.apache.gora.persistency.Dirtyable, org.apache.gora.persistency.Persistent
  Direct Known Subclasses:
    Host.Tombstone

      public class Host
      extends org.apache.gora.persistency.impl.PersistentBase
      implements org.apache.avro.specific.SpecificRecord, org.apache.gora.persistency.Persistent

  Host represents a store of webpages or other data which resides on a server or other computer so that it can be accessed over the Internet
  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `Host.Builder` RecordBuilder for Host instances.
    `static class` | `Host.Field` Enum containing all data bean's fields.
    `static class` | `Host.Tombstone`

    - ### Nested classes/interfaces inherited from class org.apache.gora.persistency.impl.PersistentBase

      `org.apache.gora.persistency.impl.PersistentBase.PersistentData`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String[]` | `_ALL_FIELDS`
    `static org.apache.avro.Schema` | `SCHEMA$`

    - ### Fields inherited from interface org.apache.gora.persistency.Persistent

      `DIRTY_BYTES_FIELD_NAME`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Host()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `contains(java.lang.String key)`
    `java.lang.Object` | `get(int field$)`
    `int` | `getFieldsCount()` Gets the total field count.
    `java.util.Map<java.lang.CharSequence,java.lang.CharSequence>` | `getInlinks()` Gets the value of the 'inlinks' field.
    `int` | `getInt(java.lang.String key, int defaultValue)`
    `long` | `getLong(java.lang.String key, long defaultValue)`
    `java.util.Map<java.lang.CharSequence,java.nio.ByteBuffer>` | `getMetadata()` Gets the value of the 'metadata' field.
    `java.util.Map<java.lang.CharSequence,java.lang.CharSequence>` | `getOutlinks()` Gets the value of the 'outlinks' field.
    `org.apache.avro.Schema` | `getSchema()`
    `Host.Tombstone` | `getTombstone()`
    `java.lang.String` | `getValue(java.lang.String key, java.lang.String defaultValue)`
    `boolean` | `isInlinksDirty()` Checks the dirty status of the 'inlinks' field.
    `boolean` | `isMetadataDirty()` Checks the dirty status of the 'metadata' field.
    `boolean` | `isOutlinksDirty()` Checks the dirty status of the 'outlinks' field.
    `static Host.Builder` | `newBuilder()` Creates a new Host RecordBuilder
    `static Host.Builder` | `newBuilder(Host.Builder other)` Creates a new Host RecordBuilder by copying an existing Builder
    `static Host.Builder` | `newBuilder(Host other)` Creates a new Host RecordBuilder by copying an existing Host instance
    `Host` | `newInstance()`
    `void` | `put(int field$, java.lang.Object value)`
    `void` | `readExternal(java.io.ObjectInput in)` Reads AVRO data bean from input stream in it s AVRO Binary encoding format to Java object format.
    `void` | `setInlinks(java.util.Map<java.lang.CharSequence,java.lang.CharSequence> value)` Sets the value of the 'inlinks' field.
    `void` | `setMetadata(java.util.Map<java.lang.CharSequence,java.nio.ByteBuffer> value)` Sets the value of the 'metadata' field.
    `void` | `setOutlinks(java.util.Map<java.lang.CharSequence,java.lang.CharSequence> value)` Sets the value of the 'outlinks' field.
    `void` | `writeExternal(java.io.ObjectOutput out)` Writes AVRO data bean to output stream in the form of AVRO Binary encoding format.

    - ### Methods inherited from class org.apache.gora.persistency.impl.PersistentBase

      `clear, clearDirty, clearDirty, clearDirty, equals, getDirtyBytes, getUnmanagedFields, isDirty, isDirty, isDirty, setDirty, setDirty, setDirty, setDirtyBytes`

    - ### Methods inherited from class org.apache.avro.specific.SpecificRecordBase

      `compareTo, get, getConverion, getConversion, hashCode, put, toString`

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

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface org.apache.gora.persistency.Persistent

      `clear, clearDirty, clearDirty, getUnmanagedFields, isDirty, isDirty, setDirty, setDirty, setDirty`

    - ### Methods inherited from interface org.apache.gora.persistency.Dirtyable

      `clearDirty, isDirty`

- - ### Field Detail

    - #### SCHEMA$

          public static final org.apache.avro.Schema SCHEMA$

    - #### _ALL_FIELDS

          public static final java.lang.String[] _ALL_FIELDS

  - ### Constructor Detail

    - #### Host

          public Host()

  - ### Method Detail

    - #### getFieldsCount

          public int getFieldsCount()

      Gets the total field count.
      Specified by:
        `getFieldsCount` in class `org.apache.gora.persistency.impl.PersistentBase`
      Returns:
        int field count

    - #### getSchema

          public org.apache.avro.Schema getSchema()

      Specified by:
        `getSchema` in interface `org.apache.avro.generic.GenericContainer`
      Specified by:
        `getSchema` in class `org.apache.avro.specific.SpecificRecordBase`

    - #### get

          public java.lang.Object get(int field$)

      Specified by:
        `get` in interface `org.apache.avro.generic.IndexedRecord`
      Specified by:
        `get` in class `org.apache.avro.specific.SpecificRecordBase`

    - #### put

          public void put(int field$,
                          java.lang.Object value)

      Specified by:
        `put` in interface `org.apache.avro.generic.IndexedRecord`
      Specified by:
        `put` in class `org.apache.avro.specific.SpecificRecordBase`

    - #### getMetadata

          public java.util.Map<java.lang.CharSequence,java.nio.ByteBuffer> getMetadata()

      Gets the value of the 'metadata' field. A multivalued metadata container used for storing a wide variety of host metadata such as structured web server characterists etc

    - #### setMetadata

          public void setMetadata(java.util.Map<java.lang.CharSequence,java.nio.ByteBuffer> value)

      Sets the value of the 'metadata' field. A multivalued metadata container used for storing a wide variety of host metadata such as structured web server characterists etc * @param value the value to set.

    - #### isMetadataDirty

          public boolean isMetadataDirty()

      Checks the dirty status of the 'metadata' field. A field is dirty if it represents a change that has not yet been written to the database. A multivalued metadata container used for storing a wide variety of host metadata such as structured web server characterists etc * @param value the value to set.

    - #### getOutlinks

          public java.util.Map<java.lang.CharSequence,java.lang.CharSequence> getOutlinks()

      Gets the value of the 'outlinks' field. Hyperlinks which direct outside of the current host domain these can used in a histogram style manner to generate host statistics

    - #### setOutlinks

          public void setOutlinks(java.util.Map<java.lang.CharSequence,java.lang.CharSequence> value)

      Sets the value of the 'outlinks' field. Hyperlinks which direct outside of the current host domain these can used in a histogram style manner to generate host statistics * @param value the value to set.

    - #### isOutlinksDirty

          public boolean isOutlinksDirty()

      Checks the dirty status of the 'outlinks' field. A field is dirty if it represents a change that has not yet been written to the database. Hyperlinks which direct outside of the current host domain these can used in a histogram style manner to generate host statistics * @param value the value to set.

    - #### getInlinks

          public java.util.Map<java.lang.CharSequence,java.lang.CharSequence> getInlinks()

      Gets the value of the 'inlinks' field. Hyperlinks which link to pages within the current host domain these can used in a histogram style manner to generate host statistics

    - #### setInlinks

          public void setInlinks(java.util.Map<java.lang.CharSequence,java.lang.CharSequence> value)

      Sets the value of the 'inlinks' field. Hyperlinks which link to pages within the current host domain these can used in a histogram style manner to generate host statistics * @param value the value to set.

    - #### isInlinksDirty

          public boolean isInlinksDirty()

      Checks the dirty status of the 'inlinks' field. A field is dirty if it represents a change that has not yet been written to the database. Hyperlinks which link to pages within the current host domain these can used in a histogram style manner to generate host statistics * @param value the value to set.

    - #### newBuilder

          public static Host.Builder newBuilder()

      Creates a new Host RecordBuilder

    - #### newBuilder

          public static Host.Builder newBuilder(Host.Builder other)

      Creates a new Host RecordBuilder by copying an existing Builder

    - #### newBuilder

          public static Host.Builder newBuilder(Host other)

      Creates a new Host RecordBuilder by copying an existing Host instance

    - #### getTombstone

          public Host.Tombstone getTombstone()

      Specified by:
        `getTombstone` in interface `org.apache.gora.persistency.Persistent`

    - #### newInstance

          public Host newInstance()

      Specified by:
        `newInstance` in interface `org.apache.gora.persistency.Persistent`

    - #### contains

          public boolean contains(java.lang.String key)

    - #### getValue

          public java.lang.String getValue(java.lang.String key,
                                           java.lang.String defaultValue)

    - #### getInt

          public int getInt(java.lang.String key,
                            int defaultValue)

    - #### getLong

          public long getLong(java.lang.String key,
                              long defaultValue)

    - #### writeExternal

          public void writeExternal(java.io.ObjectOutput out)
                             throws java.io.IOException

      Writes AVRO data bean to output stream in the form of AVRO Binary encoding format. This will transform AVRO data bean from its Java object form to it s serializable form.
      Specified by:
        `writeExternal` in interface `java.io.Externalizable`
      Overrides:
        `writeExternal` in class `org.apache.avro.specific.SpecificRecordBase`
      Parameters:
        `out` - java.io.ObjectOutput output stream to write data bean in serializable form
      Throws:
        `java.io.IOException`

    - #### readExternal

          public void readExternal(java.io.ObjectInput in)
                            throws java.io.IOException

      Reads AVRO data bean from input stream in it s AVRO Binary encoding format to Java object format. This will transform AVRO data bean from it s serializable form to deserialized Java object form.
      Specified by:
        `readExternal` in interface `java.io.Externalizable`
      Overrides:
        `readExternal` in class `org.apache.avro.specific.SpecificRecordBase`
      Parameters:
        `in` - java.io.ObjectOutput input stream to read data bean in serializable form
      Throws:
        `java.io.IOException`

Copyright © 2019 The Apache Software Foundation