Package com.norconex.committer.idol

# Class IdolCommitter

java.lang.Object
com.norconex.committer.core3.AbstractCommitter
com.norconex.committer.core3.batch.AbstractBatchCommitter
com.norconex.committer.idol.IdolCommitter

All Implemented Interfaces:
  `IBatchConsumer`, `ICommitter`, `IXMLConfigurable`, `AutoCloseable`

public class IdolCommitter extends AbstractBatchCommitter

Commits documents to IDOL Server/DIH or Connector Framework Server (CFS). Specifying either the index port or the cfs port determines which of the two will be the documents target.

## XML configuration usage:

    <committer
        class="com.norconex.committer.idol.IdolCommitter">
      <url>(IDOL/DIH/CFS index action URL. Default is "http://localhost:9001")</url>
      <cfs>[false|true](whether URL points to a Connector Framework Server)</cfs>
      <databaseName>
        (Optional IDOL Database Name where to store documents)
      </databaseName>
      <dreAddDataParams>
        <param
            name="(parameter name)">
          (parameter value)
        </param>
      </dreAddDataParams>
      <dreDeleteRefParams>
        <param
            name="(parameter name)">
          (parameter value)
        </param>
      </dreDeleteRefParams>
      <sourceReferenceField>
        (Optional name of the field holding the value to be stored in the
        IDOL "DREREFERENCE" field. Default is the document reference.)
      </sourceReferenceField>
      <sourceContentField>
        (Optional name of the field holding the value to be stored in the
        IDOL "DRECONTENT" field. Default is the document content stream.)
      </sourceContentField>
    </committer>

XML configuration entries expecting millisecond durations can be provided in human-readable format (English only), as per `DurationParser` (e.g., "5 minutes and 30 seconds" or "5m30s").

#### XML usage example:

    <committer
        class="com.norconex.committer.idol.IdolCommitter">
      <url>http://some_host:9100</url>
      <databaseName>some_database</databaseName>
    </committer>

Author:
  Pascal Essiembre

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `IdolCommitter()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected void`
  `commitBatch(Iterator<ICommitterRequest> it)`
  `boolean`
  `equals(Object other)`
  `IdolCommitterConfig`
  `getConfig()`
  `int`
  `hashCode()`
  `protected void`
  `initBatchCommitter()`
  `protected void`
  `loadBatchCommitterFromXML(XML xml)`
  `protected void`
  `saveBatchCommitterToXML(XML xml)`
  `String`
  `toString()`

  ### Methods inherited from class com.norconex.committer.core3.batch.AbstractBatchCommitter

  `closeBatchCommitter, consume, doClean, doClose, doDelete, doInit, doUpsert, getCommitterQueue, loadCommitterFromXML, saveCommitterToXML, setCommitterQueue`

  ### Methods inherited from class com.norconex.committer.core3.AbstractCommitter

  `accept, addRestriction, addRestrictions, applyFieldMappings, clean, clearFieldMappings, clearRestrictions, close, delete, fireDebug, fireDebug, fireError, fireError, fireInfo, fireInfo, getCommitterContext, getFieldMappings, getRestrictions, init, loadFromXML, removeFieldMapping, removeRestriction, removeRestriction, saveToXML, setFieldMapping, setFieldMappings, upsert`

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

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

  ### Methods inherited from interface com.norconex.commons.lang.xml.IXMLConfigurable

  `loadFromXML, saveToXML`

- ## Constructor Details

  - ### IdolCommitter

    public IdolCommitter()

- ## Method Details

  - ### getConfig

    public IdolCommitterConfig getConfig()

  - ### initBatchCommitter

    protected void initBatchCommitter() throws CommitterException
    Overrides:
      `initBatchCommitter` in class `AbstractBatchCommitter`
    Throws:
      `CommitterException`

  - ### commitBatch

    protected void commitBatch(Iterator<ICommitterRequest> it) throws CommitterException
    Specified by:
      `commitBatch` in class `AbstractBatchCommitter`
    Throws:
      `CommitterException`

  - ### loadBatchCommitterFromXML

    protected void loadBatchCommitterFromXML(XML xml)
    Specified by:
      `loadBatchCommitterFromXML` in class `AbstractBatchCommitter`

  - ### saveBatchCommitterToXML

    protected void saveBatchCommitterToXML(XML xml)
    Specified by:
      `saveBatchCommitterToXML` in class `AbstractBatchCommitter`

  - ### equals

    public boolean equals(Object other)
    Overrides:
      `equals` in class `AbstractBatchCommitter`

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `AbstractBatchCommitter`

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `AbstractBatchCommitter`