org.apache.solr.update
Class UpdateHandler
java.lang.Object
org.apache.solr.update.UpdateHandler
- All Implemented Interfaces:
- SolrInfoMBean
- Direct Known Subclasses:
- DirectUpdateHandler2
public abstract class UpdateHandler
- extends Object
- implements SolrInfoMBean
UpdateHandler
handles requests to change the index
(adds, deletes, commits, optimizes, etc).
- Since:
- solr 0.9
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected static final org.slf4j.Logger log
core
protected final SolrCore core
schema
protected final IndexSchema schema
idField
protected final SchemaField idField
idFieldType
protected final FieldType idFieldType
commitCallbacks
protected Vector<SolrEventListener> commitCallbacks
softCommitCallbacks
protected Vector<SolrEventListener> softCommitCallbacks
optimizeCallbacks
protected Vector<SolrEventListener> optimizeCallbacks
ulog
protected volatile UpdateLog ulog
UpdateHandler
public UpdateHandler(SolrCore core)
UpdateHandler
public UpdateHandler(SolrCore core,
UpdateLog updateLog)
callPostCommitCallbacks
protected void callPostCommitCallbacks()
callPostSoftCommitCallbacks
protected void callPostSoftCommitCallbacks()
callPostOptimizeCallbacks
protected void callPostOptimizeCallbacks()
newIndexWriter
public abstract void newIndexWriter(boolean rollback,
boolean forceNewDir)
throws IOException
- Called when the Writer should be opened again - eg when replication replaces
all of the index files.
- Parameters:
rollback
- IndexWriter if true else closeforceNewDir
- Force a new Directory instance
- Throws:
IOException
- If there is a low-level I/O error.
getSolrCoreState
public abstract SolrCoreState getSolrCoreState()
addDoc
public abstract int addDoc(AddUpdateCommand cmd)
throws IOException
- Throws:
IOException
delete
public abstract void delete(DeleteUpdateCommand cmd)
throws IOException
- Throws:
IOException
deleteByQuery
public abstract void deleteByQuery(DeleteUpdateCommand cmd)
throws IOException
- Throws:
IOException
mergeIndexes
public abstract int mergeIndexes(MergeIndexesCommand cmd)
throws IOException
- Throws:
IOException
commit
public abstract void commit(CommitUpdateCommand cmd)
throws IOException
- Throws:
IOException
rollback
public abstract void rollback(RollbackUpdateCommand cmd)
throws IOException
- Throws:
IOException
close
public abstract void close()
throws IOException
- Throws:
IOException
getUpdateLog
public abstract UpdateLog getUpdateLog()
registerCommitCallback
public void registerCommitCallback(SolrEventListener listener)
- NOTE: this function is not thread safe. However, it is safe to call within the
inform( SolrCore core )
function for SolrCoreAware
classes.
Outside inform
, this could potentially throw a ConcurrentModificationException
- See Also:
SolrCoreAware
registerSoftCommitCallback
public void registerSoftCommitCallback(SolrEventListener listener)
- NOTE: this function is not thread safe. However, it is safe to call within the
inform( SolrCore core )
function for SolrCoreAware
classes.
Outside inform
, this could potentially throw a ConcurrentModificationException
- See Also:
SolrCoreAware
registerOptimizeCallback
public void registerOptimizeCallback(SolrEventListener listener)
- NOTE: this function is not thread safe. However, it is safe to call within the
inform( SolrCore core )
function for SolrCoreAware
classes.
Outside inform
, this could potentially throw a ConcurrentModificationException
- See Also:
SolrCoreAware
split
public abstract void split(SplitIndexCommand cmd)
throws IOException
- Throws:
IOException
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.