Class LuceneBackendQueueProcessorFactory
java.lang.Object
org.hibernate.search.backend.impl.lucene.LuceneBackendQueueProcessorFactory
- All Implemented Interfaces:
BackendQueueProcessorFactory,UpdatableBackendQueueProcessorFactory
public class LuceneBackendQueueProcessorFactory
extends Object
implements UpdatableBackendQueueProcessorFactory
This will actually contain the Workspace and LuceneWork visitor implementation,
reused per-DirectoryProvider.
Both Workspace(s) and LuceneWorkVisitor(s) lifecycle are linked to the backend
lifecycle (reused and shared by all transactions).
The LuceneWorkVisitor(s) are stateless, the Workspace(s) are threadsafe.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Used to shutdown and eventually release resources.getProcessor(List<LuceneWork> queue) Return a runnable implementation responsible for processing the queue to a given backend.voidinitialize(Properties props, WorkerBuildContext context) Used at startup, called once as first method.voidupdateDirectoryProviders(Set<DirectoryProvider<?>> providers, WorkerBuildContext context) Update the list ofDirectoryProviders in case the SearchFactory is updated.
-
Constructor Details
-
LuceneBackendQueueProcessorFactory
public LuceneBackendQueueProcessorFactory()
-
-
Method Details
-
initialize
Description copied from interface:BackendQueueProcessorFactoryUsed at startup, called once as first method.- Specified by:
initializein interfaceBackendQueueProcessorFactory- Parameters:
props- all configuration propertiescontext- context giving access to required meta data
-
updateDirectoryProviders
public void updateDirectoryProviders(Set<DirectoryProvider<?>> providers, WorkerBuildContext context) Description copied from interface:UpdatableBackendQueueProcessorFactoryUpdate the list ofDirectoryProviders in case the SearchFactory is updated. The processor factory should react and update its state accordingly.- Specified by:
updateDirectoryProvidersin interfaceUpdatableBackendQueueProcessorFactory
-
getProcessor
Description copied from interface:BackendQueueProcessorFactoryReturn a runnable implementation responsible for processing the queue to a given backend.- Specified by:
getProcessorin interfaceBackendQueueProcessorFactory- Parameters:
queue- The work queue to process.- Returns:
Runnablewhich processesqueuewhen started.
-
close
public void close()Description copied from interface:BackendQueueProcessorFactoryUsed to shutdown and eventually release resources. No other method should be used after this one.- Specified by:
closein interfaceBackendQueueProcessorFactory
-