public abstract class UpdateHandler extends Object implements SolrInfoBean
UpdateHandler
handles requests to change the index
(adds, deletes, commits, optimizes, etc).SolrInfoBean.Category, SolrInfoBean.Group
Modifier and Type | Field and Description |
---|---|
protected Vector<SolrEventListener> |
commitCallbacks |
protected SolrCore |
core |
protected SchemaField |
idField |
protected FieldType |
idFieldType |
protected Set<String> |
metricNames |
protected Vector<SolrEventListener> |
optimizeCallbacks |
protected Vector<SolrEventListener> |
softCommitCallbacks |
protected UpdateLog |
ulog |
Constructor and Description |
---|
UpdateHandler(SolrCore core) |
UpdateHandler(SolrCore core,
UpdateLog updateLog) |
Modifier and Type | Method and Description |
---|---|
abstract int |
addDoc(AddUpdateCommand cmd) |
protected void |
callPostCommitCallbacks() |
protected void |
callPostOptimizeCallbacks() |
protected void |
callPostSoftCommitCallbacks() |
abstract void |
close() |
abstract void |
commit(CommitUpdateCommand cmd) |
abstract void |
delete(DeleteUpdateCommand cmd) |
abstract void |
deleteByQuery(DeleteUpdateCommand cmd) |
SolrInfoBean.Category |
getCategory()
Category of this component
|
Set<String> |
getMetricNames()
Modifiable set of metric names that this component reports (default is null,
which means none).
|
abstract SolrCoreState |
getSolrCoreState() |
abstract UpdateLog |
getUpdateLog() |
void |
informEventListeners(SolrCore core)
Call the
SolrCoreAware.inform(SolrCore) on all the applicable registered listeners. |
abstract int |
mergeIndexes(MergeIndexesCommand cmd) |
abstract void |
newIndexWriter(boolean rollback)
Called when the Writer should be opened again - eg when replication replaces
all of the index files.
|
void |
registerCommitCallback(SolrEventListener listener)
NOTE: this function is not thread safe.
|
void |
registerOptimizeCallback(SolrEventListener listener)
NOTE: this function is not thread safe.
|
void |
registerSoftCommitCallback(SolrEventListener listener)
NOTE: this function is not thread safe.
|
abstract void |
rollback(RollbackUpdateCommand cmd) |
abstract void |
split(SplitIndexCommand cmd) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDescription, getMetricRegistry, getMetricsSnapshot, getName, registerMetricName
protected final SolrCore core
protected final SchemaField idField
protected final FieldType idFieldType
protected Vector<SolrEventListener> commitCallbacks
protected Vector<SolrEventListener> softCommitCallbacks
protected Vector<SolrEventListener> optimizeCallbacks
protected final UpdateLog ulog
public UpdateHandler(SolrCore core)
public void informEventListeners(SolrCore core)
SolrCoreAware.inform(SolrCore)
on all the applicable registered listeners.protected void callPostCommitCallbacks()
protected void callPostSoftCommitCallbacks()
protected void callPostOptimizeCallbacks()
public abstract void newIndexWriter(boolean rollback) throws IOException
rollback
- IndexWriter if true else closeIOException
- If there is a low-level I/O error.public abstract SolrCoreState getSolrCoreState()
public abstract int addDoc(AddUpdateCommand cmd) throws IOException
IOException
public abstract void delete(DeleteUpdateCommand cmd) throws IOException
IOException
public abstract void deleteByQuery(DeleteUpdateCommand cmd) throws IOException
IOException
public abstract int mergeIndexes(MergeIndexesCommand cmd) throws IOException
IOException
public abstract void commit(CommitUpdateCommand cmd) throws IOException
IOException
public abstract void rollback(RollbackUpdateCommand cmd) throws IOException
IOException
public abstract void close() throws IOException
IOException
public abstract UpdateLog getUpdateLog()
public void registerCommitCallback(SolrEventListener listener)
inform( SolrCore core )
function for SolrCoreAware
classes.
Outside inform
, this could potentially throw a ConcurrentModificationExceptionSolrCoreAware
public void registerSoftCommitCallback(SolrEventListener listener)
inform( SolrCore core )
function for SolrCoreAware
classes.
Outside inform
, this could potentially throw a ConcurrentModificationExceptionSolrCoreAware
public void registerOptimizeCallback(SolrEventListener listener)
inform( SolrCore core )
function for SolrCoreAware
classes.
Outside inform
, this could potentially throw a ConcurrentModificationExceptionSolrCoreAware
public abstract void split(SplitIndexCommand cmd) throws IOException
IOException
public SolrInfoBean.Category getCategory()
SolrInfoBean
getCategory
in interface SolrInfoBean
public Set<String> getMetricNames()
SolrInfoBean
SolrInfoBean.registerMetricName(String)
to capture what metrics names are reported from this component.
NOTE: this set has to allow iteration under modifications.
getMetricNames
in interface SolrInfoBean
Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.