org.apache.nutch.storage

## Class ProtocolStatus

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

- 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:
    ProtocolStatus.Tombstone

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

  A nested container representing data captured from web server responses.
  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `ProtocolStatus.Builder` RecordBuilder for ProtocolStatus instances.
    `static class` | `ProtocolStatus.Field` Enum containing all data bean's fields.
    `static class` | `ProtocolStatus.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
    `ProtocolStatus()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Object` | `get(int field$)`
    `java.util.List<java.lang.CharSequence>` | `getArgs()` Gets the value of the 'args' field.
    `java.lang.Integer` | `getCode()` Gets the value of the 'code' field.
    `int` | `getFieldsCount()` Gets the total field count.
    `java.lang.Long` | `getLastModified()` Gets the value of the 'lastModified' field.
    `org.apache.avro.Schema` | `getSchema()`
    `ProtocolStatus.Tombstone` | `getTombstone()`
    `boolean` | `isArgsDirty()` Checks the dirty status of the 'args' field.
    `boolean` | `isCodeDirty()` Checks the dirty status of the 'code' field.
    `boolean` | `isLastModifiedDirty()` Checks the dirty status of the 'lastModified' field.
    `boolean` | `isSuccess()` A convenience method which returns a successful `ProtocolStatus`.
    `static ProtocolStatus.Builder` | `newBuilder()` Creates a new ProtocolStatus RecordBuilder
    `static ProtocolStatus.Builder` | `newBuilder(ProtocolStatus.Builder other)` Creates a new ProtocolStatus RecordBuilder by copying an existing Builder
    `static ProtocolStatus.Builder` | `newBuilder(ProtocolStatus other)` Creates a new ProtocolStatus RecordBuilder by copying an existing ProtocolStatus instance
    `ProtocolStatus` | `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` | `setArgs(java.util.List<java.lang.CharSequence> value)` Sets the value of the 'args' field.
    `void` | `setCode(java.lang.Integer value)` Sets the value of the 'code' field.
    `void` | `setLastModified(java.lang.Long value)` Sets the value of the 'lastModified' 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

    - #### ProtocolStatus

          public ProtocolStatus()

  - ### 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`

    - #### getCode

          public java.lang.Integer getCode()

      Gets the value of the 'code' field. A protocol response code which can be one of SUCCESS - content was retrieved without errors, FAILED - Content was not retrieved. Any further errors may be indicated in args, PROTO_NOT_FOUND - This protocol was not found. Application may attempt to retry later, GONE - Resource is gone, MOVED - Resource has moved permanently. New url should be found in args, TEMP_MOVED - Resource has moved temporarily. New url should be found in args., NOTFOUND - Resource was not found, RETRY - Temporary failure. Application may retry immediately., EXCEPTION - Unspecified exception occured. Further information may be provided in args., ACCESS_DENIED - Access denied - authorization required, but missing/incorrect., ROBOTS_DENIED - Access denied by robots.txt rules., REDIR_EXCEEDED - Too many redirects., NOTFETCHING - Not fetching., NOTMODIFIED - Unchanged since the last fetch., WOULDBLOCK - Request was refused by protocol plugins, because it would block. The expected number of milliseconds to wait before retry may be provided in args., BLOCKED - Thread was blocked http.max.delays times during fetching.

    - #### setCode

          public void setCode(java.lang.Integer value)

      Sets the value of the 'code' field. A protocol response code which can be one of SUCCESS - content was retrieved without errors, FAILED - Content was not retrieved. Any further errors may be indicated in args, PROTO_NOT_FOUND - This protocol was not found. Application may attempt to retry later, GONE - Resource is gone, MOVED - Resource has moved permanently. New url should be found in args, TEMP_MOVED - Resource has moved temporarily. New url should be found in args., NOTFOUND - Resource was not found, RETRY - Temporary failure. Application may retry immediately., EXCEPTION - Unspecified exception occured. Further information may be provided in args., ACCESS_DENIED - Access denied - authorization required, but missing/incorrect., ROBOTS_DENIED - Access denied by robots.txt rules., REDIR_EXCEEDED - Too many redirects., NOTFETCHING - Not fetching., NOTMODIFIED - Unchanged since the last fetch., WOULDBLOCK - Request was refused by protocol plugins, because it would block. The expected number of milliseconds to wait before retry may be provided in args., BLOCKED - Thread was blocked http.max.delays times during fetching. * @param value the value to set.

    - #### isCodeDirty

          public boolean isCodeDirty()

      Checks the dirty status of the 'code' field. A field is dirty if it represents a change that has not yet been written to the database. A protocol response code which can be one of SUCCESS - content was retrieved without errors, FAILED - Content was not retrieved. Any further errors may be indicated in args, PROTO_NOT_FOUND - This protocol was not found. Application may attempt to retry later, GONE - Resource is gone, MOVED - Resource has moved permanently. New url should be found in args, TEMP_MOVED - Resource has moved temporarily. New url should be found in args., NOTFOUND - Resource was not found, RETRY - Temporary failure. Application may retry immediately., EXCEPTION - Unspecified exception occured. Further information may be provided in args., ACCESS_DENIED - Access denied - authorization required, but missing/incorrect., ROBOTS_DENIED - Access denied by robots.txt rules., REDIR_EXCEEDED - Too many redirects., NOTFETCHING - Not fetching., NOTMODIFIED - Unchanged since the last fetch., WOULDBLOCK - Request was refused by protocol plugins, because it would block. The expected number of milliseconds to wait before retry may be provided in args., BLOCKED - Thread was blocked http.max.delays times during fetching. * @param value the value to set.

    - #### getArgs

          public java.util.List<java.lang.CharSequence> getArgs()

      Gets the value of the 'args' field. Optional arguments supplied to compliment and/or justify the response code.

    - #### setArgs

          public void setArgs(java.util.List<java.lang.CharSequence> value)

      Sets the value of the 'args' field. Optional arguments supplied to compliment and/or justify the response code. * @param value the value to set.

    - #### isArgsDirty

          public boolean isArgsDirty()

      Checks the dirty status of the 'args' field. A field is dirty if it represents a change that has not yet been written to the database. Optional arguments supplied to compliment and/or justify the response code. * @param value the value to set.

    - #### getLastModified

          public java.lang.Long getLastModified()

      Gets the value of the 'lastModified' field. A server reponse indicating when this page was last modified, this can be unreliable at times hence this is used as a default fall back value for the preferred 'modifiedTime' and 'preModifiedTime' obtained from the WebPage itself.

    - #### setLastModified

          public void setLastModified(java.lang.Long value)

      Sets the value of the 'lastModified' field. A server reponse indicating when this page was last modified, this can be unreliable at times hence this is used as a default fall back value for the preferred 'modifiedTime' and 'preModifiedTime' obtained from the WebPage itself. * @param value the value to set.

    - #### isLastModifiedDirty

          public boolean isLastModifiedDirty()

      Checks the dirty status of the 'lastModified' field. A field is dirty if it represents a change that has not yet been written to the database. A server reponse indicating when this page was last modified, this can be unreliable at times hence this is used as a default fall back value for the preferred 'modifiedTime' and 'preModifiedTime' obtained from the WebPage itself. * @param value the value to set.

    - #### newBuilder

          public static ProtocolStatus.Builder newBuilder()

      Creates a new ProtocolStatus RecordBuilder

    - #### newBuilder

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

      Creates a new ProtocolStatus RecordBuilder by copying an existing Builder

    - #### newBuilder

          public static ProtocolStatus.Builder newBuilder(ProtocolStatus other)

      Creates a new ProtocolStatus RecordBuilder by copying an existing ProtocolStatus instance

    - #### isSuccess

          public boolean isSuccess()

      A convenience method which returns a successful `ProtocolStatus`.
      Returns:
        the `ProtocolStatus` value for 200 (success).

    - #### getTombstone

          public ProtocolStatus.Tombstone getTombstone()

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

    - #### newInstance

          public ProtocolStatus newInstance()

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

    - #### 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