org.hibernate.search.indexes.impl
public class DefaultIndexReaderAccessor extends Object implements IndexReaderAccessor
| Constructor and Description |
|---|
DefaultIndexReaderAccessor(ImmutableSearchFactory immutableSearchFactory) |
| Modifier and Type | Method and Description |
|---|---|
void |
close(IndexReader indexReader)
Closes IndexReader instances obtained using
IndexReaderAccessor.open(Class...) |
IndexReader |
open(Class<?>... entities)
Opens an IndexReader on all indexes containing the entities passed as parameter.
|
IndexReader |
open(String... indexNames)
Opens an IndexReader on all named indexes.
|
public DefaultIndexReaderAccessor(ImmutableSearchFactory immutableSearchFactory)
public void close(IndexReader indexReader)
IndexReaderAccessorIndexReaderAccessor.open(Class...)close in interface IndexReaderAccessorindexReader - the IndexReader to be closedpublic IndexReader open(Class<?>... entities)
IndexReaderAccessor
The returned IndexReader is read only; writing directly to the index is discouraged. If you
need to write to the index use the
SearchFactoryIntegrator.getWorker() to queue change operations to the backend.
The IndexReader should not be closed in other ways except being returned to this instance via
IndexReaderAccessor.close(IndexReader).
open in interface IndexReaderAccessorentities - the entity types for which to return a (multi)readerpublic IndexReader open(String... indexNames)
IndexReaderAccessoropen in interface IndexReaderAccessorindexNames - At least one IndexManager name.Copyright © 2006-2015 Red Hat, Inc. All Rights Reserved