org.hibernate.search.backend.impl.lucene
public class LuceneBackendQueueProcessor extends Object implements BackendQueueProcessor
| Constructor and Description |
|---|
LuceneBackendQueueProcessor() |
| Modifier and Type | Method and Description |
|---|---|
void |
applyStreamWork(LuceneWork singleOperation,
IndexingMonitor monitor)
Applies a single operation on the index, and different operations can be applied in parallel,
even in parallel to a workList instance being processed by
BackendQueueProcessor.applyWork(List, IndexingMonitor) |
void |
applyWork(List<LuceneWork> workList,
IndexingMonitor monitor)
Applies a list of operations to the index.
|
void |
close()
Used to shutdown and eventually release resources.
|
Lock |
getExclusiveWriteLock() |
LuceneBackendResources |
getIndexResources() |
void |
indexMappingChanged()
Used to notify the backend that the number or type of indexed entities being indexed
in this backend changed.
|
void |
initialize(Properties props,
WorkerBuildContext context,
DirectoryBasedIndexManager indexManager)
Used at startup, called once as first method.
|
void |
setCustomWorkspace(AbstractWorkspaceImpl workspace)
If invoked before
initialize(Properties, WorkerBuildContext, DirectoryBasedIndexManager)
it can set a customized Workspace instance to be used by this backend. |
public void initialize(Properties props, WorkerBuildContext context, DirectoryBasedIndexManager indexManager)
BackendQueueProcessorinitialize in interface BackendQueueProcessorprops - all configuration propertiescontext - context giving access to required meta dataindexManager - the index it is related to.public void close()
BackendQueueProcessorclose in interface BackendQueueProcessorpublic void applyStreamWork(LuceneWork singleOperation, IndexingMonitor monitor)
BackendQueueProcessorBackendQueueProcessor.applyWork(List, IndexingMonitor)applyStreamWork in interface BackendQueueProcessorsingleOperation - single Lucene work instance to be applied to the indexmonitor - a IndexingMonitor object.public void applyWork(List<LuceneWork> workList, IndexingMonitor monitor)
BackendQueueProcessorapplyWork in interface BackendQueueProcessorworkList - list of Lucene work instance which need to be applied to the indexmonitor - a IndexingMonitor object.public Lock getExclusiveWriteLock()
getExclusiveWriteLock in interface BackendQueueProcessorpublic LuceneBackendResources getIndexResources()
public void setCustomWorkspace(AbstractWorkspaceImpl workspace)
initialize(Properties, WorkerBuildContext, DirectoryBasedIndexManager)
it can set a customized Workspace instance to be used by this backend.workspace - the new workspacepublic void indexMappingChanged()
BackendQueueProcessorindexMappingChanged in interface BackendQueueProcessorCopyright © 2006-2015 Red Hat, Inc. All Rights Reserved