Package org.apache.solr.cloud
Class StoppableIndexingThread
- java.lang.Object
-
- java.lang.Thread
-
- org.apache.solr.cloud.StoppableIndexingThread
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
-
-
Field Summary
Fields Modifier and Type Field Description protected Set<String>addFailsprotected Set<String>deleteFailsprotected List<String>deletesprotected booleandoDeletesprotected Stringid-
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
-
-
Constructor Summary
Constructors Constructor 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 Description protected voidaddFields(org.apache.solr.common.SolrInputDocument doc, Object... fields)Set<String>getAddFails()Set<String>getDeleteFails()intgetFailCount()intgetNumAdds()intgetNumDeletes()protected voidindexDocs(List<org.apache.solr.common.SolrInputDocument> docs)voidrun()voidsafeStop()-
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
-
-
-
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
-
safeStop
public void safeStop()
-
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:
IOExceptionorg.apache.solr.client.solrj.SolrServerException
-
getNumDeletes
public int getNumDeletes()
-
getNumAdds
public int getNumAdds()
-
-