org.hibernate.search.backend.impl.LocalBackendQueueProcessor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hibernate-search-engine Show documentation
Show all versions of hibernate-search-engine Show documentation
Core of the Object/Lucene mapper, query engine and index management
/*
* Hibernate Search, full-text search for your domain model
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later
* See the lgpl.txt file in the root directory or .
*/
package org.hibernate.search.backend.impl;
import java.util.List;
import java.util.Properties;
import org.hibernate.search.backend.IndexingMonitor;
import org.hibernate.search.backend.LuceneWork;
import org.hibernate.search.backend.spi.BackendQueueProcessor;
import org.hibernate.search.indexes.spi.IndexManager;
import org.hibernate.search.spi.WorkerBuildContext;
/**
* A {@link BackendQueueProcessor} which applies given index changes locally to the corresponding {@link IndexManager}.
*
* @author Gunnar Morling
*/
public class LocalBackendQueueProcessor implements BackendQueueProcessor {
private IndexManager indexManager;
@Override
public void initialize(Properties props, WorkerBuildContext context, IndexManager indexManager) {
this.indexManager = indexManager;
}
@Override
public void close() {
}
@Override
public void applyWork(List workList, IndexingMonitor monitor) {
indexManager.performOperations( workList, monitor );
}
@Override
public void applyStreamWork(LuceneWork singleOperation, IndexingMonitor monitor) {
indexManager.performStreamOperation( singleOperation, monitor, false );
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy