org.apache.solr.cloud

## Class StoppableIndexingThread

- java.lang.Object
- - java.lang.Thread
  - - org.apache.solr.cloud.StoppableIndexingThread

- All Implemented Interfaces:
    Runnable

      public class StoppableIndexingThread
      extends Thread

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class java.lang.Thread

      `Thread.State, Thread.UncaughtExceptionHandler`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Set<String>` | `addFails`
    `protected Set<String>` | `deleteFails`
    `protected List<String>` | `deletes`
    `protected boolean` | `doDeletes`
    `protected String` | `id`

    - ### Fields inherited from class java.lang.Thread

      `MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `StoppableIndexingThread(org.apache.solr.client.solrj.SolrClient controlClient, org.apache.solr.client.solrj.SolrClient cloudClient, String id, boolean doDeletes)`
    `StoppableIndexingThread(org.apache.solr.client.solrj.SolrClient controlClient, org.apache.solr.client.solrj.SolrClient cloudClient, String id, boolean doDeletes, int numCycles, int batchSize, boolean pauseBetweenUpdates)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `addFields(org.apache.solr.common.SolrInputDocument doc, Object... fields)`
    `Set<String>` | `getAddFails()`
    `Set<String>` | `getDeleteFails()`
    `int` | `getFailCount()`
    `int` | `getNumAdds()`
    `int` | `getNumDeletes()`
    `protected void` | `indexDocs(List<org.apache.solr.common.SolrInputDocument> docs)`
    `void` | `run()`
    `void` | `safeStop()`

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

      `activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield`

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

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

- - ### Field Detail

    - #### id

          protected final String id

    - #### deletes

          protected final List<String> deletes

    - #### addFails

          protected Set<String> addFails

    - #### deleteFails

          protected Set<String> deleteFails

    - #### doDeletes

          protected boolean doDeletes

  - ### Constructor Detail

    - #### StoppableIndexingThread

          public StoppableIndexingThread(org.apache.solr.client.solrj.SolrClient controlClient,
                                         org.apache.solr.client.solrj.SolrClient cloudClient,
                                         String id,
                                         boolean doDeletes)

    - #### StoppableIndexingThread

          public StoppableIndexingThread(org.apache.solr.client.solrj.SolrClient controlClient,
                                         org.apache.solr.client.solrj.SolrClient cloudClient,
                                         String id,
                                         boolean doDeletes,
                                         int numCycles,
                                         int batchSize,
                                         boolean pauseBetweenUpdates)

  - ### Method Detail

    - #### run

          public void run()

      Specified by:
        `run` in interface `Runnable`
      Overrides:
        `run` in class `Thread`

    - #### safeStop

          public void safeStop()

    - #### getAddFails

          public Set<String> getAddFails()

    - #### getDeleteFails

          public Set<String> getDeleteFails()

    - #### getFailCount

          public int getFailCount()

    - #### addFields

          protected void addFields(org.apache.solr.common.SolrInputDocument doc,
                                   Object... fields)

    - #### indexDocs

          protected void indexDocs(List<org.apache.solr.common.SolrInputDocument> docs)
                            throws IOException,
                                   org.apache.solr.client.solrj.SolrServerException

      Throws:
        `IOException`
        `org.apache.solr.client.solrj.SolrServerException`

    - #### getNumDeletes

          public int getNumDeletes()

    - #### getNumAdds

          public int getNumAdds()

Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.