Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.hibernate.search.reader
Interface ReaderProvider

All Known Implementing Classes:
  NotSharedReaderProvider, SharedReaderProvider, SharingBufferReaderProvider

    public interface ReaderProvider

Responsible for providing and managing the lifecycle of a read only reader. The implementation must have a no-arg constructor.

Note that the reader must be closed once opened.

Author:
  Emmanuel Bernard

Method Summary
`void` | `closeReader(org.apache.lucene.index.IndexReader reader)` Close a reader previously opened by `openReader(org.hibernate.search.store.DirectoryProvider...)`.
`void` | `destroy()` Called when a `SearchFactory` is destroyed.
`void` | `initialize(java.util.Properties props, SearchFactoryImplementor searchFactoryImplementor)` Inialize the reader provider before its use.
`org.apache.lucene.index.IndexReader` | `openReader(DirectoryProvider... directoryProviders)` Open a read-only reader on all the listed directory providers.

Method Detail

### openReader

    org.apache.lucene.index.IndexReader openReader(DirectoryProvider... directoryProviders)

  Open a read-only reader on all the listed directory providers. The opened reader has to be closed through `closeReader(IndexReader)`. The opening can be virtual.

### closeReader

    void closeReader(org.apache.lucene.index.IndexReader reader)

  Close a reader previously opened by `openReader(org.hibernate.search.store.DirectoryProvider...)`. The closing can be virtual.

### initialize

    void initialize(java.util.Properties props,
                    SearchFactoryImplementor searchFactoryImplementor)

  Inialize the reader provider before its use.

### destroy

    void destroy()

  Called when a `SearchFactory` is destroyed. This method typically releases resources. It is guaranteed to be executed after readers are released by queries (assuming no user error).

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006-2010 Hibernate. All Rights Reserved.