org.hibernate.search.backend.impl.batch
public class DefaultBatchBackend extends Object implements BatchBackend
BatchBackend| Constructor and Description |
|---|
DefaultBatchBackend(SearchFactoryIntegrator searchFactoryImplementor,
MassIndexerProgressMonitor progressMonitor) |
| Modifier and Type | Method and Description |
|---|---|
void |
doWorkInSync(LuceneWork work)
Does one work in sync
|
void |
enqueueAsyncWork(LuceneWork work)
Enqueues one work to be processed asynchronously
|
void |
flush(Set<Class<?>> entityTypes)
Since most work is done async in the backend, we need to flush at the end to
make sure we don't return control before all work was processed,
and that IndexWriters are committed or closed.
|
void |
optimize(Set<Class<?>> entityTypes)
Triggers optimization of all indexes containing at least one instance of the
listed targetedClasses.
|
public DefaultBatchBackend(SearchFactoryIntegrator searchFactoryImplementor, MassIndexerProgressMonitor progressMonitor)
public void enqueueAsyncWork(LuceneWork work) throws InterruptedException
BatchBackendenqueueAsyncWork in interface BatchBackendwork - a LuceneWork object.InterruptedException - if the current thread is interrupted while
waiting for the work queue to have enough space.public void doWorkInSync(LuceneWork work)
BatchBackenddoWorkInSync in interface BatchBackendpublic void flush(Set<Class<?>> entityTypes)
BatchBackendflush in interface BatchBackendentityTypes - a Set object.public void optimize(Set<Class<?>> entityTypes)
BatchBackendoptimize in interface BatchBackendentityTypes - Used to specify which indexes need optimization.Copyright © 2006-2015 Red Hat, Inc. All Rights Reserved