|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.hibernate.search.indexes.impl.DefaultIndexReaderAccessor
public class DefaultIndexReaderAccessor
Provides access to IndexReaders. IndexReaders opened through this service need to be closed using this service.
Constructor Summary | |
---|---|
DefaultIndexReaderAccessor(ImmutableSearchFactory immutableSearchFactory)
|
Method Summary | |
---|---|
void |
close(org.apache.lucene.index.IndexReader indexReader)
Closes IndexReader instances obtained using IndexReaderAccessor.open(Class...) |
org.apache.lucene.index.IndexReader |
open(Class<?>... entities)
Opens an IndexReader on all indexes containing the entities passed as parameter. |
org.apache.lucene.index.IndexReader |
open(String... indexNames)
Opens an IndexReader on all named indexes. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultIndexReaderAccessor(ImmutableSearchFactory immutableSearchFactory)
Method Detail |
---|
public void close(org.apache.lucene.index.IndexReader indexReader)
IndexReaderAccessor
IndexReaderAccessor.open(Class...)
close
in interface IndexReaderAccessor
indexReader
- the IndexReader to be closedpublic org.apache.lucene.index.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 IndexReaderAccessor
entities
- the entity types for which to return a (multi)reader
public org.apache.lucene.index.IndexReader open(String... indexNames)
IndexReaderAccessor
open
in interface IndexReaderAccessor
indexNames
- At least one IndexManager name.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |